Improve panel navigation, invitations, themes, and account setup
This commit is contained in:
1 parent
570addf37a
commit
ddec53170b
46 files changed
+1856
-199
No files matched your search
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user