Skip to content
Snippets Groups Projects
Verified Commit 7522ecf1 authored by Hangzhi Yu's avatar Hangzhi Yu Committed by magicfelix
Browse files

Check if person exists in dashboard edit permission check

parent de62182b
No related branches found
No related tags found
No related merge requests found
Pipeline #113512 passed with warnings
......@@ -12,6 +12,7 @@ Unreleased
Fixed
~~~~~
* The permission check for the dashboard edit page failed when the user had no person assigned.
* OIDC scope "phone" had no claims.
* AlekSIS groups were not synced to Django groups on registration of existing persons
* Invitations for existing short name did not work.
......
......@@ -1001,7 +1001,8 @@ class EditDashboardView(PermissionRequiredMixin, View):
if (
self.default_dashboard
and not request.user.has_perm("core.edit_default_dashboard_rule")
or getattr(person, "is_dummy", False)
or getattr(request.user, "person", True)
and getattr(request.user.person, "is_dummy", False)
):
raise PermissionDenied()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment