Since all of the ImpersonationLog
model's fields are in the ImpersonationLogAdmin
class' readonly_fields
, there is no need for the "Add impersonation log" button. I propose that you add this to the ImpersonationLogAdmin
class:
def has_add_permission(self, request):
return False
I could make a pull request of this if you're interested.
No Message
Thanks. This is definitely a good idea
How about making read-only?
actions = None def has_add_permission(self, request): return False def has_delete_permission(self, request, obj=None): return False # hack to show records but limit updating. # `return False` hides impersonates module in admin page def has_change_permission(self, request, obj=None): return request.method in ['GET', 'HEAD']
This is probably related to #41 as well.