dppxp79175 2015-01-02 12:44
浏览 28

用于查看较低级别用户的php权限级别

I have a problem I just cannot figure out. I am writing an app for my place of work to manage and plan shift patterns and holidays. There are 4 levels of user:

Level 1 - User
Level 2 - Manager
Level 3 - Senior Manager
Level 4 - Admin

I currently use bitwise type permission to authorise who can access what on the app and this is working fine. What I want now is to allow a user or a higher level to edit and authorise data from users of a lower level. So basically a manager can authorise a user and a Senior manager can authorise both a user and manager. The permissions are store in a single field in the following format.

User - 000
Manager - 001
Senior Manager - 011
Admin - 111

So with this I can search the DB for any user that has a permission set less than the current users permission.

Except...

Here's the problem.

I have a trusted manager who I want to be an admin to add users and manage the system but I don't want them to be able to authorise any one but users data?

I know I tend to waffle but does anyone have any ideas on this??

Many Thanks,

Gav.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 netty整合springboot之后自动重连失效
    • ¥20 wireshark抓不到vlan
    • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
    • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
    • ¥15 stata安慰剂检验作图但是真实值不出现在图上
    • ¥15 c程序不知道为什么得不到结果
    • ¥40 复杂的限制性的商函数处理
    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击