mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Change permission
Only Superuser can edit config settings
This commit is contained in:
parent
51966084d7
commit
46d88815e7
1 changed files with 4 additions and 1 deletions
|
|
@ -109,7 +109,10 @@ class ConstanceAdmin(admin.ModelAdmin):
|
|||
return False
|
||||
|
||||
def has_change_permission(self, *args, **kwargs):
|
||||
return True
|
||||
if request.user.is_superuser:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
class Config(object):
|
||||
|
|
|
|||
Loading…
Reference in a new issue