[英]How to give only one user more authorization than other users?
I have a question about giving authorization to a user by Admin but not to all users. 我有一个问题,关于由Admin而不是所有用户授予用户授权。
Example: Let assume we have 3 levels of users: 1) Admin as genera manager 2) HR , Sales as department head 3) users as normal employees 示例:假设我们有3个级别的用户:1)管理员为一般经理2)人力资源部,销售为部门主管3)用户为普通员工
let say the Admin wants to go for a vacation for one week and wants to give HR department head an authorization(s) during the vacation but not Sales department head. 假设管理员想放假一个星期,并想在放假期间给人事部门主管一个授权,而不是销售部门主管。
I DONT know if there is a key word in PHP for this scenario. 我不知道这种情况下PHP中是否有关键字。
In my idea I want to make a php page in Admin account that shows all employees and each employee has a button to go to next page to show all authorization that the Admin can do it and in each one has check box. 以我的想法,我想在Admin帐户中创建一个php页面,该页面显示所有员工,每个员工都有一个转到下一页的按钮,以显示Admin可以执行的所有授权,并且每个人都有一个复选框。 If any check box is selected, the auth.
如果选中任何复选框,则验证。 will be shown in that user.
将显示在该用户中。
I hope this is help. 希望对您有所帮助。
Thank you 谢谢
我认为您应该在user_tbl role
int中添加一个字段,当任何用户登录时,其值对于管理员1是用户1,对于管理员2是值,那么您必须检查用户及其代表的角色(例如,如果用户A是登录名,其role
是2然后),您可以为他显示管理员功能...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.