Skip to content

Commit

Permalink
did: adjust for new API
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Feb 21, 2023
1 parent 929c5af commit eb1acc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions basxconnect/core/views/menu_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

# New menu group with developer mode checking
class DevGroup(menu.Group):
def has_permission(self, request):
return super().has_permission(request) and request.session.get(
def has_permission(self, context):
return super().has_permission(context) and context["request"].session.get(
DEVMODE_KEY, False
)


class SuperUserItem(menu.Item):
def has_permission(self, request):
return super().has_permission(request) and request.user.is_superuser
def has_permission(self, context):
return super().has_permission(context) and context["request"].user.is_superuser


R = layout.grid.Row
Expand Down

0 comments on commit eb1acc8

Please sign in to comment.