mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 23:02:21 +01:00
Do not allow staff modify song hash
This commit is contained in:
@ -14,3 +14,7 @@ class SongAdmin(admin.ModelAdmin):
|
|||||||
return obj.user.name
|
return obj.user.name
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return '<unknown>'
|
return '<unknown>'
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_readonly_fields(request, obj=None):
|
||||||
|
return [] if request.user.is_superuser else ['hash']
|
||||||
Reference in New Issue
Block a user