开发者

User permission check steps in CakePHP

开发者 https://www.devze.com 2022-12-27 19:36 出处:网络
I want to understand the sequence of steps how it is verified that a user has permission to particular application page (\'Acl\', \'Auth\', \'Security\' c开发者_运维百科omponents are used). For exampl

I want to understand the sequence of steps how it is verified that a user has permission to particular application page ('Acl', 'Auth', 'Security' c开发者_运维百科omponents are used). For example, a visitor clicks a link on another site that directs him to my application. What is the sequence of steps that my application does to verify that this user has access to the page? What controllers/classes and methods are called?


  1. if Auth is required on that page, your app checks if a user is logged in
  2. if not, it redirects to login page
  3. if yes, your app should check permission,
  4. normally, it checks your user group to see if that group has permission on that page
  5. if it does, it checks that username to see if that user has permission on that page

logics for 3,4 and 5 should be done in app_controller

thats my take on it.

0

精彩评论

暂无评论...
验证码 换一张
取 消