问题
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