Skip to content

Commit

Permalink
fix origin info
Browse files Browse the repository at this point in the history
  • Loading branch information
Atanazyy committed Dec 22, 2024
1 parent d367490 commit 47ff36b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions oioioi/problems/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,15 @@ def formfield_for_manytomany(self, db_field, request, **kwargs):
return super(OriginInfoValueAdmin, self).formfield_for_manytomany(
db_field, request, **kwargs
)

def has_add_permission(self, request, obj=None):
return request.user.has_perm("problems.can_add_tags")

def has_change_permission(self, request, obj=None):
return request.user.has_perm("problems.can_add_tags")

def has_delete_permission(self, request, obj=None):
return request.user.has_perm("problems.can_add_tags")

admin.site.register(OriginInfoValue, OriginInfoValueAdmin)

Expand Down

0 comments on commit 47ff36b

Please sign in to comment.