seaislee1209 daa82aee76 feat: add sub-account login to AirGate
- IAMUser model: login_password_hash + login_enabled fields
- Custom JWT auth for sub-accounts (role: iam_user)
- Login/me/my-keys/reveal endpoints for sub-accounts
- Admin can set login password via set-login endpoint
- Sub-accounts can only see their own API Keys

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 01:30:35 +08:00

59 lines
2.6 KiB
Python

from django.urls import path
from . import views
urlpatterns = [
# Dashboard
path('dashboard/', views.dashboard_view),
# Volcengine account management
path('volc-accounts/', views.volc_account_view),
path('volc-accounts/<int:pk>/', views.volc_account_detail_view),
path('volc-accounts/<int:pk>/test/', views.volc_account_test_view),
# IAM user management
path('iam-users/', views.iam_user_list_view),
path('iam-users/create/', views.iam_user_create_view),
path('iam-users/sync/', views.iam_user_sync_view),
path('iam-users/import/', views.iam_user_import_view),
path('iam-users/<int:pk>/', views.iam_user_detail_view),
path('iam-users/<int:pk>/update/', views.iam_user_update_view),
path('iam-users/<int:pk>/set-login/', views.iam_user_set_login_view),
path('iam-users/<int:pk>/disable/', views.iam_user_disable_view),
path('iam-users/<int:pk>/enable/', views.iam_user_enable_view),
path('iam-users/<int:pk>/policies/', views.iam_user_policies_view),
path('iam-users/<int:pk>/policies/attach/', views.iam_user_attach_policy_view),
path('iam-users/<int:pk>/policies/detach/', views.iam_user_detach_policy_view),
# IAM user projects (multi-project)
path('iam-users/<int:pk>/projects/', views.iam_user_project_list_view),
path('iam-users/<int:pk>/projects/add/', views.iam_user_project_add_view),
path('iam-users/<int:pk>/projects/<int:pid>/', views.iam_user_project_update_view),
path('iam-users/<int:pk>/projects/<int:pid>/policies/', views.iam_user_project_policies_view),
path('iam-users/<int:pk>/projects/<int:pid>/delete/', views.iam_user_project_delete_view),
path('iam-users/<int:pk>/projects/toggle-all/', views.iam_user_project_toggle_all_view),
# Quota
path('iam-users/<int:pk>/allocate/', views.quota_allocate_view),
path('iam-users/<int:pk>/quota-history/', views.quota_history_view),
# Billing
path('billing/overview/', views.spending_overview_view),
path('billing/refresh/', views.spending_refresh_view),
path('billing/balance/', views.balance_view),
# Global config
path('config/', views.global_config_view),
# Alerts
path('alerts/', views.alert_list_view),
# Projects
path('projects/', views.project_list_view),
# Ark API Key management (manual entry)
path('ark-keys/', views.ark_key_list_view),
path('ark-keys/create/', views.ark_key_create_view),
path('ark-keys/<int:pk>/', views.ark_key_update_view),
path('ark-keys/<int:pk>/delete/', views.ark_key_delete_view),
path('ark-keys/<int:pk>/reveal/', views.ark_key_reveal_view),
]