feat(roles): add admin store roles page, permission i18n, and menu integration
Some checks failed
Some checks failed
- Add admin store roles page with merchant→store cascading for superadmin and store-only selection for platform admin - Add permission catalog API with translated labels/descriptions (en/fr/de/lb) - Add permission translations to all 15 module locale files (60 files total) - Add info icon tooltips for permission descriptions in role editor - Add store roles menu item and admin menu item in module definition - Fix store-selector.js URL construction bug when apiEndpoint has query params - Add admin store roles API (CRUD + platform scoping) - Add integration tests for admin store roles and permission catalog Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,34 @@ async def admin_store_domains_page(
|
||||
)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# STORE ROLES ROUTES
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@router.get("/store-roles", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def admin_store_roles_page(
|
||||
request: Request,
|
||||
current_user: User = Depends(
|
||||
require_menu_access("store-roles", FrontendType.ADMIN)
|
||||
),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""
|
||||
Render store roles management page.
|
||||
Allows admins to select a store and manage its roles and permissions.
|
||||
Super admins see merchant → store cascading selection.
|
||||
Platform admins see store selection scoped to their platforms.
|
||||
"""
|
||||
is_super_admin = current_user.role == "super_admin"
|
||||
return templates.TemplateResponse(
|
||||
"tenancy/admin/store-roles.html",
|
||||
get_admin_context(
|
||||
request, db, current_user, is_super_admin=is_super_admin
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# STORE THEMES ROUTES
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user