How to set the permissions for admins of Django/Mezzanine sites

六眼飞鱼酱① 提交于 2020-01-02 05:19:17

问题


I'm not sure what permissions I have to assign to a group so that users of that group can login to the admin area of the specific Mezzanine site that they are assigned to. The user have Staff status checked.

I want the group to have limited access to settings such as:

sites (all)
redirects (all)
core (all)
auth | can add user
auth | can delete user
auth | permission (all)
auth | group (all)

I'm note sure what this permissions are suppost to do (but when adding them I can't login anyway):

admin | log entry (all)

The error message I get is:

You don't have permission to access the admin for this site.


回答1:


You have to actually click on the site name in the "Site permissions" part of the user's screen in the admin. It isn't obvious that just clicking on the site name does anything but once you do this and save the user info, a record gets added to the core_sitepermission and core_sitepermission_sites table that associates this user with a site.

Without this, the Mezzanine SitePermissionMiddleware.process_view will cause an exception which will show this particular message. Once I made this change, the user was able to log in to the admin site and then was able to edit the other site features that they were given permissions on.



来源:https://stackoverflow.com/questions/33434024/how-to-set-the-permissions-for-admins-of-django-mezzanine-sites

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!