Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7195397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:34:18+00:00 2026-05-28T20:34:18+00:00

I am learning the ACL feature of cakephp. I have gone though cakephp docs.

  • 0

I am learning the ACL feature of cakephp. I have gone though cakephp docs. For learning more, I have checked the code/db of some ACL plugins like croogo and alaxos ACL plugin. I can see that in aros_acos table, there are columns like _create, _read, _update and _delete. From those examples (croogo/alaxos), for an action, for example:- add (under users controller), I can see the value as 1 1 1 1 in _create, _read, _update and _delete columns. As the name indicates add should only be mapped to _create (1 0 0 0), right ? Also, in this scenario do we need 4 columns ?

Im confused with the action mode with the CRUD mode. In my application, there are some features like approve, reject etc other than CRUD. Do I need to add columns for these actions ? Or mapactions will be suitable for this (in that case, do I need to map all actions in the controller) ? Also, in my app I need to give the owner edit and owner delete permissions . How to do all these with the Cakephp ACL in a better way ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:34:19+00:00Added an answer on May 28, 2026 at 8:34 pm

    It depends on what you want to do with Acl. What you have looked at in Croogo or Alaxos Acl plugin (my plugin by the way) is the use of Acl to allow/deny access to some actions.
    This is achieved by the use of the AuthComponent and AclComponent together. When doing this, if you look at the Cake code, the permission check is done in the DbAcl class in the following method:

    function check($aro, $aco, $action = "*")
    

    which takes potentially three arguments.

    The call to this function is done by the ActionsAuthorize class in the authorize() function at the following line:

    return $Acl->check($user, $this->action($request));
    

    which is obviously a call without the third argument.

    So basically what is this third argument ? It is the way to take care of the _xxx fields of the aros_acos datatable. So all together this means that the Auth+Acl components do not use these _xxx fields to check permissions.
    Well actually they are used, but differently: when the third argument is not used, all fields set to 1 means allowed, and if one or more fields are set to -1, it means denied.
    Personally for the Alaxos Acl plugin, I choosed to set all these fields to -1 for a deny, just for more clarity.

    Regarding your application, if its ‘features’ are mapped to actions, you could probably just forget these _xxx fields and use the core Auth+Acl mechanism.

    About your last question (owner edit and delete), it is a frequently asked question with Cake ACL.
    The answer is most of the time that it is simpler to compare the Object.user_id and the logged user id to decide if a user can edit/delete a record. Cake ACL does not support record’s owners out of the box.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Learning client side code of an existing site, would like to understand some activity
learning about loops (still a beginner) in VB.net. I have got the below code
In CakePHP, when you are using Acl/Auth, do you need to have Routing.prefixes enabled
Learning Scala currently and needed to invert a Map to do some inverted value->key
Learning jquery, so please be kind :) Using PHP, I have a table with
Learning spine.js I completed both the tutorials no problem, seems like a great framework,
Learning C++ and see the class laid out like this: class CRectangle { int
Learning java server technologies, trying to clarify some things. There are few technologies that
Learning rails and something smells a little funny. I have the following form for
Learning php! I have a sql database which contains a table called 'images' which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.