如何设置Django /夹层网站管理员的权限 [英] How to set the permissions for admins of Django/Mezzanine sites

查看:194
本文介绍了如何设置Django /夹层网站管理员的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道我必须为组分配哪些权限,以便该组的用户可以登录到分配给它们的特定夹层网站的管理区域。该用户已选中员工状态



我希望该组对访问权限有限,如: / p>

 网站(全部)
重定向(全部)
核心(全部)
auth |可以添加用户
auth |可以删除用户
auth |许可(全部)
auth | group(all)

我注意到这个权限是什么(但是添加它们时,我无法登录):

  admin |日志条目(全部)

我收到的错误消息是: p>

您没有权限访问该网站的管理员。

解决方案

您必须在管理员的用户屏幕的站点权限部分中实际点击站点名称。不太明显的是,只要点击网站名称,只要一旦执行此操作,并保存用户信息,则会将记录添加到将该用户与站点关联的core_sitepermission和core_sitepermission_sites表中。



没有这个,Mezzanine SitePermissionMiddleware.process_view会导致一个异常,它会显示这个特定的消息。进行此更改后,用户可以登录管理站点,然后可以编辑其授予权限的其他站点功能。


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.

解决方案

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.

这篇关于如何设置Django /夹层网站管理员的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆