Skip to content
Snippets Groups Projects
Commit 758ab532 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Add proper permission checking to personal note type

parent 4027e000
No related branches found
No related tags found
1 merge request!460Resolve "Permission bugs with editable list on person statistics page"
Pipeline #194853 failed
...@@ -26,6 +26,14 @@ class PersonalNoteType( ...@@ -26,6 +26,14 @@ class PersonalNoteType(
"documentation", "documentation",
) )
@staticmethod
def resolve_can_edit(root: NewPersonalNote, info, **kwargs):
return info.context.user.has_perm("alsijil.edit_personal_note_rule", root)
@staticmethod
def resolve_can_delete(root: NewPersonalNote, info, **kwargs):
return info.context.user.has_perm("alsijil.edit_personal_note_rule", root)
class PersonalNoteBatchCreateMutation(BaseBatchCreateMutation): class PersonalNoteBatchCreateMutation(BaseBatchCreateMutation):
class Meta: class Meta:
......
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