Improve panel navigation, invitations, themes, and account setup
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s

This commit is contained in:
parkel committed 2026-11-22 21:44:23 +01:00
1 parent 570addf37a
commit ddec53170b
46 files changed
+1856 -199

No files matched your search

+16 -2
View File
@@ -53,12 +53,26 @@ def panel_access(request):
section = NAVIGATION_SECTIONS.get(
match.route.split("/", 1)[0], match.url_name
)
operator = request.user.is_authenticated and not (customer or reseller)
grouped = reseller or (
operator
and sum(
request.user.has_perm(f"hosting.view_{resource}")
for resource in (
"hostingaccount",
"customer",
"reseller",
"hostingplan",
)
)
> 1
)
return {
"is_customer": customer,
"is_reseller": reseller,
"is_tenant": customer or reseller,
"is_operator": request.user.is_authenticated
and not (customer or reseller),
"is_operator": operator,
"group_customer_navigation": grouped,
"panel_section": section,
}