Another ACL issue (nested ACOs)

2012-07-19 Thread senser
Hello,

I'm developing a quite simple projest and want to use ACL on it. I've set 
up authentication process but have problems with authorization against CRUD.
Here is the Auth component settings in my AppController.php:

'Auth' => array(
'loginAction' => array('controller' => 'users', 'action' => 
'login'),
'loginRedirect' => array('controller' => 'pages', 'action'=> 
'display', 'home'),
'loginError' => 'Invalid login',
'authError' => 'Unauthorized access',
'flash' => array('key' => 'flash', 'element' => 'default'),
'userScope' => array('User.active = 1'),
'authenticate' => array(
'Form',
),
'authorize' => array(
'Crud' => array(
'actionPath' => 'Application/')
)
)

And here is my (simplified) ACO tree:

  [18] Application
[64] Comments
[82] ReadOnly
  [52] Statuses

Permissions are as follows
:
_create_read_update_delete
Application111-1
ReadOnly   -1  1-1-1

I expect that Stauses as ReadOnly successor are going to be "readable", but 
when going on "/Statuses/read", ACL error occurs:"Failed ARO/ACO node 
lookup in permissions check". I looked the sql queries that ACL component 
produces and here is a sample:

SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, 
`Aco`.`alias` FROM `Base`.`acos` AS `Aco` LEFT JOIN `Base`.`acos` AS `Aco0` 
ON (`Aco0`.`alias` = 'Application') LEFT JOIN `Base`.`acos` AS `Aco1` ON 
(`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` < `Aco0`.`rght` AND 
`Aco1`.`alias` = 'Statuses' AND `Aco0`.`id` = `Aco1`.`parent_id`)  WHERE 
((`Aco`.`lft` <= `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR 
(`Aco`.`lft` <= `Aco1`.`lft` AND `Aco`.`rght` >= `Aco1`.`rght`))   ORDER BY 
`Aco`.`lft` DESC;

That query returns a single row "Application" not finding "Statuses" 
because they are not "Application" direct successors. 

Cake acl shell works fine though:

cake acl check Employees Statuses read

Welcome to CakePHP v2.1.3 Console
---
App : base
Path: /home/senser/taxundo/base/
---
Employees is allowed.

Sql queries produced from the the shell are quite different:

SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, 
`Aco`.`alias` FROM `Base`.`acos` AS `Aco` LEFT JOIN `Base`.`acos` AS `Aco0` 
ON (`Aco0`.`alias` = 'Statuses')  WHERE `Aco`.`lft` <= `Aco0`.`lft` AND 
`Aco`.`rght` >= `Aco0`.`rght`   ORDER BY `Aco`.`lft` DESC

SELECT `Permission`.`id`, `Permission`.`aro_id`, `Permission`.`aco_id`, 
`Permission`.`_create`, `Permission`.`_read`, `Permission`.`_update`, 
`Permission`.`_delete`, `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, 
`Aro`.`foreign_key`, `Aro`.`alias`, `Aro`.`lft`, `Aro`.`rght`, `Aco`.`id`, 
`Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, `Aco`.`alias`, 
`Aco`.`lft`, `Aco`.`rght` FROM `Base`.`aros_acos` AS `Permission` LEFT JOIN 
`Base`.`aros` AS `Aro` ON (`Permission`.`aro_id` = `Aro`.`id`) LEFT JOIN 
`Base`.`acos` AS `Aco` ON (`Permission`.`aco_id` = `Aco`.`id`)  WHERE 
`Permission`.`aro_id` = 1 AND `Permission`.`aco_id` IN (71, 82, 18)   ORDER 
BY `Aco`.`lft` desc

Can you help please - am I doing something wrong or may be misunderstanding?

Regards,
Nikolay

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cakephp 2.1 ACL Issue

2012-03-28 Thread 0x20h
Please provide more information on your setup and your problem,
otherwise nobody is going to be able help you.


Am 27.03.2012 09:02, schrieb sneha:
> Hi,
>
> I am using the ACL component of cakephp 2.1, I am facing issue with
> acl permissions check. I have integrated the ACL and created the
> groups / users. But the page level check is not working for the same.
>
> Please guide me on the same.
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Cakephp 2.1 ACL Issue

2012-03-27 Thread sneha
Hi,

I am using the ACL component of cakephp 2.1, I am facing issue with
acl permissions check. I have integrated the ACL and created the
groups / users. But the page level check is not working for the same.

Please guide me on the same.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: ACL issue

2011-06-18 Thread Felix Fennell
Hi Don,

Sorry for taking so long to reply (study commitments) basically your suggestion 
works brilliantly - I'm only annoyed I didn't realise your suggestion myself.

Thanks again for saving me a lot of agro :) 
--Felix
[My e-mail load: http://courteous.ly/AXc5sh]


On Thursday, 5 May 2011 at 23:49, dreamingmind wrote:

> Felix,
> 
> I'm not aware of anything that would prevent a User from having
> several connections into the aros table. You have three fields in aros
> that can potentially play a role in connecting a user to an aros node:
> alias
> model
> foreign_key
> 
> If you had a president that was User.id=12, you could easily have
> several records that read Aros.model='User' Aros.foreign_key=12 and
> that were each children of different aros parents (or you could use
> alias to do the job). Once could be a child of President, another the
> child of Instructor/Theory.
> 
> Each child would have different acos permissions and your
> authentication check would just have to look out for the multiple
> permissions.
> 
> So let's say you set alia to a concatenation of model and id like some
> of the tutorials do, your aros tree could look like this:
> 
>  Overlord (a master account)
> - Committee
> - President
> - User::12
> - Treasurer
> - etc.
> - Instructors
> - Practical
> - Theory
> - User::12
> - Trainees
> 
> Regards,
> Don
> 
> On May 4, 2:35 pm, Felix  (http://felixfennell.co.uk)> wrote:
> > Hello everyone,
> > 
> > I have a query regarding how to structure the ACL system in my app.
> > 
> > Basically i'm creating a management app for a diving club. The club
> > has three broad groups,
> > 
> > - Instructors
> > - Trainees
> > - Committee
> > 
> > The ACL tree looks like this at the moment
> > 
> > - Sebastian (name of site)
> >  Overlord (a master account)
> > - Committee
> > - President
> > - Treasurer
> > - etc.
> > - Instructors
> > - Practical
> > - Theory
> > - Trainees
> > 
> > Each position above is a group (name, description) which have many to
> > one relationships with a user (username, password, name).
> > 
> > The above system works fine except for one problem. Committee members
> > are always either an instructor or trainee, therefore they need to be
> > assigned to two groups (instructor/trainee AND the relevant committee
> > position).
> > 
> > Basically I need to place a user into two levels in the tree which
> > aren't related to each other hierarchically.
> > 
> > As far as I know this isn't possible with Cake's ACL component unless
> > theres something I've missed. I know the relationship between groups
> > -- users needs changing to a HABTM relationship but I'm unsure how ACL
> > treats these.
> > 
> > Has anyone come across this sort of problem before and able to outline
> > their solution, or have I been an idiot and missed something really
> > obvious.
> > 
> > Sorry for such a long message, I didn't want to miss anything out -
> > thanks in advance,
> > 
> > --Felix Fennell
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: ACL issue

2011-05-05 Thread dreamingmind
Felix,

I'm not aware of anything that would prevent a User from having
several connections into the aros table. You have three fields in aros
that can potentially play a role in connecting a user to an aros node:
alias
model
foreign_key

If you had a president that was User.id=12, you could easily have
several records that read Aros.model='User' Aros.foreign_key=12 and
that were each children of different aros parents (or you could use
alias to do the job). Once could be a child of President, another the
child of Instructor/Theory.

Each child would have different acos permissions and your
authentication check would just have to look out for the multiple
permissions.

So let's say you set alia to a concatenation of model and id like some
of the tutorials do, your aros tree could look like this:

 Overlord (a master account)
- Committee
- President
- User::12
- Treasurer
- etc.
- Instructors
- Practical
- Theory
- User::12
- Trainees

Regards,
Don

On May 4, 2:35 pm, Felix  wrote:
> Hello everyone,
>
> I have a query regarding how to structure the ACL system in my app.
>
> Basically i'm creating a management app for a diving club. The club
> has three broad groups,
>
> - Instructors
> - Trainees
> - Committee
>
> The ACL tree looks like this at the moment
>
> - Sebastian (name of site)
>  Overlord (a master account)
> - Committee
> - President
> - Treasurer
> - etc.
> - Instructors
> - Practical
> - Theory
> - Trainees
>
> Each position above is a group (name, description) which have many to
> one relationships with a user (username, password, name).
>
> The above system works fine except for one problem. Committee members
> are always either an instructor or trainee, therefore they need to be
> assigned to two groups (instructor/trainee AND the relevant committee
> position).
>
> Basically I need to place a user into two levels in the tree which
> aren't related to each other hierarchically.
>
> As far as I know this isn't possible with Cake's ACL component unless
> theres something I've missed. I know the relationship between groups
> -- users needs changing to a HABTM relationship but I'm unsure how ACL
> treats these.
>
> Has anyone come across this sort of problem before and able to outline
> their solution, or have I been an idiot and missed something really
> obvious.
>
> Sorry for such a long message, I didn't want to miss anything out -
> thanks in advance,
>
> --Felix Fennell

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


ACL issue

2011-05-04 Thread Felix
Hello everyone,

I have a query regarding how to structure the ACL system in my app.

Basically i'm creating a management app for a diving club. The club
has three broad groups,

- Instructors
- Trainees
- Committee

The ACL tree looks like this at the moment

- Sebastian (name of site)
 Overlord (a master account)
- Committee
- President
- Treasurer
- etc.
- Instructors
- Practical
- Theory
- Trainees

Each position above is a group (name, description) which have many to
one relationships with a user (username, password, name).

The above system works fine except for one problem. Committee members
are always either an instructor or trainee, therefore they need to be
assigned to two groups (instructor/trainee AND the relevant committee
position).

Basically I need to place a user into two levels in the tree which
aren't related to each other hierarchically.

As far as I know this isn't possible with Cake's ACL component unless
theres something I've missed. I know the relationship between groups
-- users needs changing to a HABTM relationship but I'm unsure how ACL
treats these.

Has anyone come across this sort of problem before and able to outline
their solution, or have I been an idiot and missed something really
obvious.

Sorry for such a long message, I didn't want to miss anything out -
thanks in advance,

--Felix Fennell

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: ACL issue

2009-11-10 Thread andrzejborkow...@gmail.com


On 3 Lis, 17:17, "kwameda...@gmail.com"  wrote:
> Please help me resolve this ACL issue. I'm going through the tutorial
> "10.2.6 An Automated tool for creating ACOs"
> (http://book.cakephp.org/view/647/An-Automated-tool-for-creating-
> ACOs)
> and getting stuck with the following error message when creating the
> ACOs by running the
>
> build_acl():
>
> Fatal error: Call to a member function node() on a non-object in C:
> \wamp\www\xchange\app\controllers\users_controller.php on line 92
>
> Awaiting any help you can offer
>
> Thnx,
>
> Sam
try put Acl component in user_controller.php class ... { public
$components = 'Acl'; }

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.




ACL issue

2009-11-03 Thread kwameda...@gmail.com

Please help me resolve this ACL issue. I'm going through the tutorial
"10.2.6 An Automated tool for creating ACOs"
(http://book.cakephp.org/view/647/An-Automated-tool-for-creating-
ACOs)
and getting stuck with the following error message when creating the
ACOs by running the

build_acl():

Fatal error: Call to a member function node() on a non-object in C:
\wamp\www\xchange\app\controllers\users_controller.php on line 92

Awaiting any help you can offer

Thnx,

Sam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL issue

2009-11-03 Thread samuel darko
Please help me resolve this ACL issue. I'm going through the tutorial
"10.2.6 An Automated tool for creating ACOs" getting stuck with the
following error message when creating the ACOs by running the build_acl():

*Fatal error*: Call to a member function node() on a non-object in *
C:\wamp\www\xchange\app\controllers\users_controller.php* on line *92*

Awaiting any help you can offer

Thnx,

Sam

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL Issue.. aros_acos table

2009-10-05 Thread Ryan Maule

Hello,

I am having trouble with setting up ACLs.  My aros and acos tables are
properly set up, from what I can tell.

I have an admin user that is working correctly.  I have a regular user
that isn't working.. it only gets access to the index view if _read,
_create, _update, _delete are all set to 1.  If I set any of them to 0
or -1, it no longer gets access.

Sample ecords from aros_acos

(aro_id, aco_id, _create, _read, _update, _delete) (1,1,-1,-1,-1,-1)
[deny all to controller]
(aro_id, aco_id, _create, _read, _update, _delete) (1,1,0,1,0,0)
[allow index to Pages]
(aro_id, aco_id, _create, _read, _update, _delete) (1,1,1,1,0,0)
[allow index, add to Notes]
(aro_id, aco_id, _create, _read, _update, _delete) (1,1,1,1,1,1)
[allow all to Chat]

In this example, I can only access the Chat index view.  All others
boot me back to the homepage.

I am using Mark Story's MenuComponent, which makes this problem more
obvious because I can only view menus for Chat in the example above,
when I'd expect menus for Pages and Notes to show up with add options
for Notes and Chat.

Thanks for your help!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



acl issue..plz help

2009-06-23 Thread Paulos23

hi people,
I want to build an Acl app with these details:
I want have 3 groups Admin,User_Premium,User_Guest.
So my aro tree will be something like that:
-Admin
  -User_Premium
-User_Guest

And aco tree:
-controllers
  -Users
   -add
   -view
   -index
   -edit
   -delete
   -change_status
 -Profiles
   -add
   -view
   -edit

I am using the 'actions' mode.Is this approach right?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Plz need help...Acl issue

2009-06-17 Thread Paulos23

Hello peeps,
i am trying to build an Acl app for my needs and i want help.I have
read many articles in google but most off them have bugs or are
outdated.To make you understand,i want a simple authorization (i have
already install Auth and works fine for authentication) for some
actions.
First of all , i want 3 groups: Admin,Premium_User,Guest_user.
As for my controllers they are 3:
User_Controller,Profiles_Controller,Groups_Controller
The permissions will be: access to all controllers for Admin,access to
''own''  view,edit and add in both controllers for Premium_User,and
access only in add action from Users_Controller.

To build my aco i used the automated tool from the cake tutorial, but
apart from that i haven't get the thing with Acl Behavior.When a new
user is added i want an aro and an aco be created for this.The Acl
Behavior can do them both automatically or i have to put code in add
function for create an aro,aco?

Plz help me...
Paulos
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: ACL issue

2009-05-14 Thread Dave Maharaj :: WidePixels.com

 
Hey,

Thanks for your help.

What I did was re-configure index keys in the db for the ones most used,
cleared app/temp/cache/models and it worked. Thought it seems for me to run
buildAcl again I have to clear the cache or I get the error again.

Thanks,

Dave
-Original Message-
From: John Andersen [mailto:j.andersen...@gmail.com] 
Sent: May-14-09 3:32 AM
To: CakePHP
Subject: Re: ACL issue


Ok, I will try to look at it in between working :) ... Hopefully someone
else may know about this too, and reply to you while I am looking!
   John

On May 13, 5:06 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> Hello John,
>
> This is what I see when I run buildAcl from the browser (x 238 times 
> just the alias` = 'apply' changes for each controller action)
>
> Query: SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, 
> `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN 
> `acos` AS `Aco0` ON (`Aco0`.`alias` = 'controllers') LEFT JOIN `acos` 
> AS `Aco1` ON (`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` < 
> `Aco0`.`rght` AND `Aco1`.`alias` = 'Applicants') LEFT JOIN `acos` AS 
> `Aco2` ON (`Aco2`.`lft` > `Aco1`.`lft` AND `Aco2`.`rght` < 
> `Aco1`.`rght` AND `Aco2`.`alias` = 'apply') WHERE ((`Aco`.`lft` <= 
> `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR (`Aco`.`lft` <= 
> `Aco2`.`lft` AND `Aco`.`rght` >= `Aco2`.`rght`))   ORDER BY 
> `Aco`.`lft` DESC
>
> Now there is one of these statements it seems for every action up to a 
> certin point
>
> Array
> (
>     [0] => Created Aco node for apply
> 
> 
> 
>     [238] => Created Aco node for admin_edit
> )
>
> It stops at 238 but looking thru the array I can clearly see missing 
> actions not in the array, check the db and nothing was created
>
> Ideas?
>
> -Original Message-
> From: John Andersen [mailto:j.andersen...@gmail.com]
> Sent: May-13-09 3:47 AM
> To: CakePHP
> Subject: Re: ACL issue
>
> Hi Dave,
> Can you post the created sql statements, that may help to discover why!
> MAX_JOIN_SIZE is the limit on number of records that one SELECT using 
> JOINs may process. As specified in the MySql forum, either set the 
> number bigger or use SET SQL_BIG_SELECTS=1 before your select (a 
> little difficult using CakePHPs built-in sql statement generator).
>
> I agree that with 10 records in each, it shouldn't reach the limit, 
> but let's see what the statements may tell us :)
>    John
>
> On May 13, 5:57 am, "Dave Maharaj :: WidePixels.com"
>  wrote:
> > The server I am hosting with cannot have anything changed so this is 
> > it
>
> > max_allowed_packet       33554432 max_binlog_cache_size 
> > 18446744073709547520 max_binlog_size  1073741824 max_connect_errors 
> > 10 max_connections  600 max_delayed_threads      20 max_error_count
> > 64 max_heap_table_size      268435456 max_insert_delayed_threads 20 
> > max_join_size    1 max_length_for_sort_data         1024 
> > max_prepared_stmt_count  16382 max_relay_log_size       0 
> > max_seeks_for_key        18446744073709551615 max_sort_length  1024 
> > max_sp_recursion_depth   0 max_tmp_tables   1024 
> > max_user_connections 60 max_write_lock_count     
> > 18446744073709551615
>
> > Does this look normal to what you are using for your apps?
>
> > 
>
> > From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
> > Sent: May-12-09 9:29 PM
> > To: cake-php@googlegroups.com
> > Subject: ACL issue
>
> > Asked this before but did some more testing and the problem has come 
> > up again.
>
> > When building an ACL app i followed the cookbook and initBD and 
> > buildACL work fine. When I add tables to that setup and then I get 
> > MAX_JOIN error in SQL? What would cause this? I checked mySQL 
> > settings and MAX_JOIN_SIZE is listed at 100,000,000.
>
> > If i run the exact same table structure locally where my 
> > MAX_JOIN_SIZE is
> > 4,294,967,295 it runs the initBD and buildAcl fine with no errors
> reported.
>
> > Tested using cake 1.2.3.8166
> > There are 40 tables in the db 10 are HABTM tables. Is there a 
> > limitation of any kinds using HABTM or something thats causing this
error?
> > What is MAX_JON_SIZE exactly? And what would cause it to be over? My 
> > tables are only populated with 10 entries each with dummy info as 
> > its just in development.
>
> > All my tables have ID PRIMARY key INT (10) AUTO INCREMENT
>
> > There is a patch i found
> onhttp://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i.

Re: ACL issue

2009-05-13 Thread John Andersen

Ok, I will try to look at it in between working :) ... Hopefully
someone else may know about this too, and reply to you while I am
looking!
   John

On May 13, 5:06 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> Hello John,
>
> This is what I see when I run buildAcl from the browser (x 238 times just
> the alias` = 'apply' changes for each controller action)
>
> Query: SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`,
> `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS
> `Aco0` ON (`Aco0`.`alias` = 'controllers') LEFT JOIN `acos` AS `Aco1` ON
> (`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` < `Aco0`.`rght` AND
> `Aco1`.`alias` = 'Applicants') LEFT JOIN `acos` AS `Aco2` ON (`Aco2`.`lft` >
> `Aco1`.`lft` AND `Aco2`.`rght` < `Aco1`.`rght` AND `Aco2`.`alias` = 'apply')
> WHERE ((`Aco`.`lft` <= `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR
> (`Aco`.`lft` <= `Aco2`.`lft` AND `Aco`.`rght` >= `Aco2`.`rght`))   ORDER BY
> `Aco`.`lft` DESC
>
> Now there is one of these statements it seems for every action up to a
> certin point
>
> Array
> (
>     [0] => Created Aco node for apply
> 
> 
> 
>     [238] => Created Aco node for admin_edit
> )
>
> It stops at 238 but looking thru the array I can clearly see missing actions
> not in the array, check the db and nothing was created
>
> Ideas?
>
> -Original Message-
> From: John Andersen [mailto:j.andersen...@gmail.com]
> Sent: May-13-09 3:47 AM
> To: CakePHP
> Subject: Re: ACL issue
>
> Hi Dave,
> Can you post the created sql statements, that may help to discover why!
> MAX_JOIN_SIZE is the limit on number of records that one SELECT using JOINs
> may process. As specified in the MySql forum, either set the number bigger
> or use SET SQL_BIG_SELECTS=1 before your select (a little difficult using
> CakePHPs built-in sql statement generator).
>
> I agree that with 10 records in each, it shouldn't reach the limit, but
> let's see what the statements may tell us :)
>    John
>
> On May 13, 5:57 am, "Dave Maharaj :: WidePixels.com"
>  wrote:
> > The server I am hosting with cannot have anything changed so this is
> > it
>
> > max_allowed_packet       33554432 max_binlog_cache_size    
> > 18446744073709547520 max_binlog_size  1073741824 max_connect_errors      
> > 10 max_connections  600 max_delayed_threads      20 max_error_count  
> > 64 max_heap_table_size      268435456 max_insert_delayed_threads      
> > 20 max_join_size    1 max_length_for_sort_data         1024
> > max_prepared_stmt_count  16382 max_relay_log_size       0
> > max_seeks_for_key        18446744073709551615 max_sort_length  1024
> > max_sp_recursion_depth   0 max_tmp_tables   1024 max_user_connections    
> > 60 max_write_lock_count     18446744073709551615
>
> > Does this look normal to what you are using for your apps?
>
> > 
>
> > From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
> > Sent: May-12-09 9:29 PM
> > To: cake-php@googlegroups.com
> > Subject: ACL issue
>
> > Asked this before but did some more testing and the problem has come
> > up again.
>
> > When building an ACL app i followed the cookbook and initBD and
> > buildACL work fine. When I add tables to that setup and then I get
> > MAX_JOIN error in SQL? What would cause this? I checked mySQL settings
> > and MAX_JOIN_SIZE is listed at 100,000,000.
>
> > If i run the exact same table structure locally where my MAX_JOIN_SIZE
> > is
> > 4,294,967,295 it runs the initBD and buildAcl fine with no errors
> reported.
>
> > Tested using cake 1.2.3.8166
> > There are 40 tables in the db 10 are HABTM tables. Is there a
> > limitation of any kinds using HABTM or something thats causing this error?
> > What is MAX_JON_SIZE exactly? And what would cause it to be over? My
> > tables are only populated with 10 entries each with dummy info as its
> > just in development.
>
> > All my tables have ID PRIMARY key INT (10) AUTO INCREMENT
>
> > There is a patch i found
> onhttp://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i...
> > 1.2.php
> > <http://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i...
> > _1.2.php>  and if i modify the db_acl.php it runs with no errors but
> > still patching the app is not what i want. Just to find out why it does
> this.
>
> > Could I get some feed back on people usingACL with large database
> > tables who could give me an idea of the size of their tabl

RE: ACL issue

2009-05-13 Thread Dave Maharaj :: WidePixels.com

Hello John,

This is what I see when I run buildAcl from the browser (x 238 times just
the alias` = 'apply' changes for each controller action)

Query: SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`,
`Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS
`Aco0` ON (`Aco0`.`alias` = 'controllers') LEFT JOIN `acos` AS `Aco1` ON
(`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` < `Aco0`.`rght` AND
`Aco1`.`alias` = 'Applicants') LEFT JOIN `acos` AS `Aco2` ON (`Aco2`.`lft` >
`Aco1`.`lft` AND `Aco2`.`rght` < `Aco1`.`rght` AND `Aco2`.`alias` = 'apply')
WHERE ((`Aco`.`lft` <= `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR
(`Aco`.`lft` <= `Aco2`.`lft` AND `Aco`.`rght` >= `Aco2`.`rght`))   ORDER BY
`Aco`.`lft` DESC

Now there is one of these statements it seems for every action up to a
certin point 

Array
(
[0] => Created Aco node for apply



[238] => Created Aco node for admin_edit
)


It stops at 238 but looking thru the array I can clearly see missing actions
not in the array, check the db and nothing was created

Ideas?
-Original Message-
From: John Andersen [mailto:j.andersen...@gmail.com] 
Sent: May-13-09 3:47 AM
To: CakePHP
Subject: Re: ACL issue


Hi Dave,
Can you post the created sql statements, that may help to discover why!
MAX_JOIN_SIZE is the limit on number of records that one SELECT using JOINs
may process. As specified in the MySql forum, either set the number bigger
or use SET SQL_BIG_SELECTS=1 before your select (a little difficult using
CakePHPs built-in sql statement generator).

I agree that with 10 records in each, it shouldn't reach the limit, but
let's see what the statements may tell us :)
   John


On May 13, 5:57 am, "Dave Maharaj :: WidePixels.com"
 wrote:
> The server I am hosting with cannot have anything changed so this is 
> it
>
> max_allowed_packet       33554432 max_binlog_cache_size    
> 18446744073709547520 max_binlog_size  1073741824 max_connect_errors       
> 10 max_connections  600 max_delayed_threads      20 max_error_count  
> 64 max_heap_table_size      268435456 max_insert_delayed_threads       
> 20 max_join_size    1 max_length_for_sort_data         1024 
> max_prepared_stmt_count  16382 max_relay_log_size       0 
> max_seeks_for_key        18446744073709551615 max_sort_length  1024 
> max_sp_recursion_depth   0 max_tmp_tables   1024 max_user_connections     
> 60 max_write_lock_count     18446744073709551615
>
> Does this look normal to what you are using for your apps?
>
> 
>
> From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
> Sent: May-12-09 9:29 PM
> To: cake-php@googlegroups.com
> Subject: ACL issue
>
> Asked this before but did some more testing and the problem has come 
> up again.
>
> When building an ACL app i followed the cookbook and initBD and 
> buildACL work fine. When I add tables to that setup and then I get 
> MAX_JOIN error in SQL? What would cause this? I checked mySQL settings 
> and MAX_JOIN_SIZE is listed at 100,000,000.
>
> If i run the exact same table structure locally where my MAX_JOIN_SIZE 
> is
> 4,294,967,295 it runs the initBD and buildAcl fine with no errors
reported.
>
> Tested using cake 1.2.3.8166
> There are 40 tables in the db 10 are HABTM tables. Is there a 
> limitation of any kinds using HABTM or something thats causing this error?
> What is MAX_JON_SIZE exactly? And what would cause it to be over? My 
> tables are only populated with 10 entries each with dummy info as its 
> just in development.
>
> All my tables have ID PRIMARY key INT (10) AUTO INCREMENT
>
> There is a patch i found
onhttp://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i...
> 1.2.php
> <http://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i...
> _1.2.php>  and if i modify the db_acl.php it runs with no errors but 
> still patching the app is not what i want. Just to find out why it does
this.
>
> Could I get some feed back on people usingACL with large database 
> tables who could give me an idea of the size of their tables and let 
> me know what your MAX_JOIN_SIZE is listed at for your mySQL? Maybe its 
> a hosting issue and nothing to do with cake at all.
>
> Thanks in advance.
>
> Dave


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL issue

2009-05-12 Thread John Andersen

Hi Dave,
Can you post the created sql statements, that may help to discover
why!
MAX_JOIN_SIZE is the limit on number of records that one SELECT using
JOINs may process. As specified in the MySql forum, either set the
number bigger or use SET SQL_BIG_SELECTS=1 before your select (a
little difficult using CakePHPs built-in sql statement generator).

I agree that with 10 records in each, it shouldn't reach the limit,
but let's see what the statements may tell us :)
   John


On May 13, 5:57 am, "Dave Maharaj :: WidePixels.com"
 wrote:
> The server I am hosting with cannot have anything changed so this is it
>
> max_allowed_packet       33554432        
> max_binlog_cache_size    18446744073709547520    
> max_binlog_size  1073741824      
> max_connect_errors       10      
> max_connections  600    
> max_delayed_threads      20      
> max_error_count  64      
> max_heap_table_size      268435456      
> max_insert_delayed_threads       20      
> max_join_size    1      
> max_length_for_sort_data         1024    
> max_prepared_stmt_count  16382  
> max_relay_log_size       0      
> max_seeks_for_key        18446744073709551615    
> max_sort_length  1024    
> max_sp_recursion_depth   0      
> max_tmp_tables   1024    
> max_user_connections     60      
> max_write_lock_count     18446744073709551615
>
> Does this look normal to what you are using for your apps?
>
> 
>
> From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
> Sent: May-12-09 9:29 PM
> To: cake-php@googlegroups.com
> Subject: ACL issue
>
> Asked this before but did some more testing and the problem has come up
> again.
>
> When building an ACL app i followed the cookbook and initBD and buildACL
> work fine. When I add tables to that setup and then I get MAX_JOIN error in
> SQL? What would cause this? I checked mySQL settings and MAX_JOIN_SIZE is
> listed at 100,000,000.
>
> If i run the exact same table structure locally where my MAX_JOIN_SIZE is
> 4,294,967,295 it runs the initBD and buildAcl fine with no errors reported.
>
> Tested using cake 1.2.3.8166
> There are 40 tables in the db 10 are HABTM tables. Is there a limitation of
> any kinds using HABTM or something thats causing this error?
> What is MAX_JON_SIZE exactly? And what would cause it to be over? My tables
> are only populated with 10 entries each with dummy info as its just in
> development.
>
> All my tables have ID PRIMARY key INT (10) AUTO INCREMENT
>
> There is a patch i found 
> onhttp://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i...
> 1.2.php
> <http://realm3.com/articles/setting_up_users_groups_withacl_and_auth_i...
> _1.2.php>  and if i modify the db_acl.php it runs with no errors but still
> patching the app is not what i want. Just to find out why it does this.
>
> Could I get some feed back on people usingACL with large database tables who
> could give me an idea of the size of their tables and let me know what your
> MAX_JOIN_SIZE is listed at for your mySQL? Maybe its a hosting issue and
> nothing to do with cake at all.
>
> Thanks in advance.
>
> Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: ACL issue

2009-05-12 Thread Dave Maharaj :: WidePixels.com

The server I am hosting with cannot have anything changed so this is it
 
max_allowed_packet   33554432
max_binlog_cache_size18446744073709547520
max_binlog_size  1073741824  
max_connect_errors   10  
max_connections  600 
max_delayed_threads  20  
max_error_count  64  
max_heap_table_size  268435456   
max_insert_delayed_threads   20  
max_join_size1   
max_length_for_sort_data 1024
max_prepared_stmt_count  16382   
max_relay_log_size   0   
max_seeks_for_key18446744073709551615
max_sort_length  1024
max_sp_recursion_depth   0   
max_tmp_tables   1024
max_user_connections 60  
max_write_lock_count 18446744073709551615
 

Does this look normal to what you are using for your apps?



From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] 
Sent: May-12-09 9:29 PM
To: cake-php@googlegroups.com
Subject: ACL issue


Asked this before but did some more testing and the problem has come up
again.
 
When building an ACL app i followed the cookbook and initBD and buildACL
work fine. When I add tables to that setup and then I get MAX_JOIN error in
SQL? What would cause this? I checked mySQL settings and MAX_JOIN_SIZE is
listed at 100,000,000. 
 
If i run the exact same table structure locally where my MAX_JOIN_SIZE is
4,294,967,295 it runs the initBD and buildAcl fine with no errors reported.
 
Tested using cake 1.2.3.8166
There are 40 tables in the db 10 are HABTM tables. Is there a limitation of
any kinds using HABTM or something thats causing this error?
What is MAX_JON_SIZE exactly? And what would cause it to be over? My tables
are only populated with 10 entries each with dummy info as its just in
development.
 
All my tables have ID PRIMARY key INT (10) AUTO INCREMENT
 
There is a patch i found on 
http://realm3.com/articles/setting_up_users_groups_withacl_and_auth_in_cake_
1.2.php
<http://realm3.com/articles/setting_up_users_groups_withacl_and_auth_in_cake
_1.2.php>  and if i modify the db_acl.php it runs with no errors but still
patching the app is not what i want. Just to find out why it does this.
 
Could I get some feed back on people usingACL with large database tables who
could give me an idea of the size of their tables and let me know what your
MAX_JOIN_SIZE is listed at for your mySQL? Maybe its a hosting issue and
nothing to do with cake at all.
 
Thanks in advance.
 
Dave 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL issue

2009-05-12 Thread Dave Maharaj :: WidePixels.com
Asked this before but did some more testing and the problem has come up
again.
 
When building an ACL app i followed the cookbook and initBD and buildACL
work fine. When I add tables to that setup and then I get MAX_JOIN error in
SQL? What would cause this? I checked mySQL settings and MAX_JOIN_SIZE is
listed at 100,000,000. 
 
If i run the exact same table structure locally where my MAX_JOIN_SIZE is
4,294,967,295 it runs the initBD and buildAcl fine with no errors reported.
 
Tested using cake 1.2.3.8166
There are 40 tables in the db 10 are HABTM tables. Is there a limitation of
any kinds using HABTM or something thats causing this error?
What is MAX_JON_SIZE exactly? And what would cause it to be over? My tables
are only populated with 10 entries each with dummy info as its just in
development.
 
All my tables have ID PRIMARY key INT (10) AUTO INCREMENT
 
There is a patch i found on 
 

http://realm3.com/articles/setting_up_users_groups_withacl_and_auth_in_cake_
1.2.php and if i modify the db_acl.php it runs with no errors but still
patching the app is not what i want. Just to find out why it does this.
 
Could I get some feed back on people usingACL with large database tables who
could give me an idea of the size of their tables and let me know what your
MAX_JOIN_SIZE is listed at for your mySQL? Maybe its a hosting issue and
nothing to do with cake at all.
 
Thanks in advance.
 
Dave 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP console and ACL issue.

2008-04-15 Thread Ma'moon
much appreciated!

On Tue, Apr 15, 2008 at 12:51 PM, aranworld <[EMAIL PROTECTED]> wrote:

>
> initdb no longer works.
>
> Check this out to see if it helps.  It includes a link to where you
> can get information on what the table schema should be like:
>
> http://aranworld.com/article/162/cakephp-acl-tutorial-initial-setup
>
> You have to now run:
>
> cake schema run create DbAcl
>
>
> On Apr 15, 2:52 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > check the sql folder inside config
> >
> > cake acl initdb (did it for me ealier; and has for a while)
> >
> > more help from the console
> > cake acl help grant
> > cake acl help create
> >
> >  - S
> >
> > On 15/04/2008, Haris <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hello,
> >
> > > The console absolute paths doesn't work for me. The console is
> > > documented poorly probably because it's still in beta. Anyways, I want
> > > to create database tables for ACL.
> >
> > > Can someone please help me and provide me the structure of ACL tables
> > > in SQL format (.sql file) which I can import to my database.
> >
> > > Thanks,
> > > Haris
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP console and ACL issue.

2008-04-15 Thread aranworld

initdb no longer works.

Check this out to see if it helps.  It includes a link to where you
can get information on what the table schema should be like:

http://aranworld.com/article/162/cakephp-acl-tutorial-initial-setup

You have to now run:

cake schema run create DbAcl


On Apr 15, 2:52 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> check the sql folder inside config
>
> cake acl initdb (did it for me ealier; and has for a while)
>
> more help from the console
> cake acl help grant
> cake acl help create
>
>  - S
>
> On 15/04/2008, Haris <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > The console absolute paths doesn't work for me. The console is
> > documented poorly probably because it's still in beta. Anyways, I want
> > to create database tables for ACL.
>
> > Can someone please help me and provide me the structure of ACL tables
> > in SQL format (.sql file) which I can import to my database.
>
> > Thanks,
> > Haris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP console and ACL issue.

2008-04-15 Thread Sam Sherlock
check the sql folder inside config

cake acl initdb (did it for me ealier; and has for a while)

more help from the console
cake acl help grant
cake acl help create

 - S

On 15/04/2008, Haris <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> The console absolute paths doesn't work for me. The console is
> documented poorly probably because it's still in beta. Anyways, I want
> to create database tables for ACL.
>
> Can someone please help me and provide me the structure of ACL tables
> in SQL format (.sql file) which I can import to my database.
>
> Thanks,
> Haris
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP console and ACL issue.

2008-04-15 Thread Haris

Hello,

The console absolute paths doesn't work for me. The console is
documented poorly probably because it's still in beta. Anyways, I want
to create database tables for ACL.

Can someone please help me and provide me the structure of ACL tables
in SQL format (.sql file) which I can import to my database.

Thanks,
Haris

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---