You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom action, eg: publish_article. And i want users with only view permission to perform this action. However, this package gives no actions for users with only view permission. I think this is not reasonable.
related code: admin_view_permission/admin.py, line 208:
# If the user doesn't have delete permission return an empty
# OrderDict otherwise return only the default admin_site actions
if not self.has_delete_permission(request):
return OrderedDict()
The text was updated successfully, but these errors were encountered:
Thank you for the report. To implement something like this requires different permissions per action which adds a lot of complexity.
For example let's say that we have 2 actions:
Updates all the rows with some values.
Return a csv with the selected rows.
In the above scenario a user with view permission only should be able to execute only the 2nd action, not the 1st one. So, we need something that specifies a permission per action. The package cannot handle these cases because it depends on each project and your needs. To succeed that you could override the get_actions method on your modeladmin class and return the appropriate actions according to the permissions.
I have a custom action, eg: publish_article. And i want users with only view permission to perform this action. However, this package gives no actions for users with only view permission. I think this is not reasonable.
related code: admin_view_permission/admin.py, line 208:
The text was updated successfully, but these errors were encountered: