dpqg86714 2017-03-24 02:09
浏览 25

如何在codeigniter中使用PHP为CRUD等函数创建用户规则

I have made a user rules for menu. so every user only can see the menu they have not all, but now I need to creating user rules for each function like CRUD in codeigniter, so the user cannot do any function without setting the function they need in set rules of CRUD functions. may someone can help me for the guidline how to creating set rules for function like CRUD, so from the function we can choose what kind of function user can use.

I'm try to create like this pic, so we can choose the function that user can use

  • 写回答

1条回答 默认 最新

  • douxuzui4590 2017-03-24 02:31
    关注

    I think what you want is to have every user to have a role, correct? If I'm an administrator, I can create,delete and update. If I'm just an ordinary user, all I can do is just view the data. When you create a user on the database, have a field where you specify if he is an Admin or a User. Then when a user login, give them a $_SESSION['AccountType']. You have to manipulate the page according to the account type.

    评论

报告相同问题?

悬赏问题

  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私