Re: ACL Aro multiple parents Cake 1.2

2007-11-06 Thread BravoFoxtrot

I'm just taking a stab in the dark here but is the following
possible?  Hopefully someone can help me out..

Create three tables:

create table users(
id,
firstname,
lastname,
username,
email );

create table groups(
id,
name,
description,
parent_id);

create table groups_users(
id,
users_id,
groups_id,
default ); --default is a boolean

Now if we have the user "user1" with an id of 1 and groups "group1"
and "group2", is there anyway you can have alias' such as
"group1_user1" and "group2_user1"?  These alias' would have an ID of 1
the same as "user1".

$aro->create( 1, null, 'user1' );
$aro->create( 0, null, 'group1' );
$aro->create( 0, null, 'group2' );

$aro->setParent('group1', 'group1_user1');
$aro->setParent('group2', 'group2_user1');


I'm just learning this but can you not look up the permissions based
on the alias or the id.  Some extra logic is needed in the
users_controller.php (or somewhere else?) to handle this.  The extra
logic would need to look up the default group's permission first and
then the remaining group permissions if the default group is denied.

Now as I'm reviewing this post I'm wondering how the $aro-
>setParent('group1', 'group1_user1'); knows that "group1_user1" is
actually user1?  Do I have to do something like this:

$aro->create( 1, null, 'user1' );
$aro->create( 1, null, 'group1_user1' );
$aro->create( 1, null, 'group2_user1' );

This looks clunky.


--~--~-~--~~~---~--~~
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: ACL Aro multiple parents Cake 1.2

2007-11-06 Thread AD7six



On Nov 6, 2:34 pm, Pravalitera <[EMAIL PROTECTED]> wrote:
> This is for 1.1. The ACL Component from cake 1.2 does not seem to
> handle multi-group users. Maybe dauth is easyly convertible to 1.2...

Maybe, but as dauth is not related to acl (its an authentication not
authorization solution), ifs not relevant to your question. the acl-
admin plugin is exactly that: for administration, the part of it that
applied access control (the ac component) is superseded by cake's own
auth component. It should be fairly easy to adapt it to 1.2, and
that's one of the things I´ll look at in the near future.

I don't know how to attempt users belonging to multiple groups with
the cake acl solution (unless you code it manually) but if you want
that look at phpGACL as you can do so with that. What you really want
if that's the case is perhaps a role based auth system. You might want
to compare the db tables between phpGACL and cake's own acl solution
to see what adding multiple inheritance would require on the db since,
logically, a node in a tree (a user in the aros table, a resorce in
the acos table) can only have one parent.

hth,

AD

>
> On 5 nov, 20:53, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > Check out dauth but you will want to view the cached google infomation
> > first the page was 
> > moved..http://64.233.167.104/search?q=cache:nO61TuOudjAJ:bakery.cakephp.org/...
>
> >http://www.ad7six.com/Demos
>
> >http://cakeforge.org/projects/acl-admingoodexample but you will need
> > dauth or some sort of authentication working before you start.
>
> > On Nov 5, 8:56 am, BravoFoxtrot <[EMAIL PROTECTED]> wrote:
>
> > > I'd love to see an example of this also.  I've been combing the web
> > > trying to find a good example.


--~--~-~--~~~---~--~~
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: ACL Aro multiple parents Cake 1.2

2007-11-06 Thread Pravalitera

This is for 1.1. The ACL Component from cake 1.2 does not seem to
handle multi-group users. Maybe dauth is easyly convertible to 1.2...


On 5 nov, 20:53, seacloud9 <[EMAIL PROTECTED]> wrote:
> Check out dauth but you will want to view the cached google infomation
> first the page was 
> moved..http://64.233.167.104/search?q=cache:nO61TuOudjAJ:bakery.cakephp.org/...
>
> http://www.ad7six.com/Demos
>
> http://cakeforge.org/projects/acl-admingood example but you will need
> dauth or some sort of authentication working before you start.
>
> On Nov 5, 8:56 am, BravoFoxtrot <[EMAIL PROTECTED]> wrote:
>
> > I'd love to see an example of this also.  I've been combing the web
> > trying to find a good example.


--~--~-~--~~~---~--~~
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: ACL Aro multiple parents Cake 1.2

2007-11-05 Thread seacloud9

Check out dauth but you will want to view the cached google infomation
first the page was moved..
http://64.233.167.104/search?q=cache:nO61TuOudjAJ:bakery.cakephp.org/articles/view/introduction-to-dauth-v0-3+dauth+cakephp&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a


http://www.ad7six.com/Demos

http://cakeforge.org/projects/acl-admin good example but you will need
dauth or some sort of authentication working before you start.

On Nov 5, 8:56 am, BravoFoxtrot <[EMAIL PROTECTED]> wrote:
> I'd love to see an example of this also.  I've been combing the web
> trying to find a good example.


--~--~-~--~~~---~--~~
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: ACL Aro multiple parents Cake 1.2

2007-11-05 Thread BravoFoxtrot

I'd love to see an example of this also.  I've been combing the web
trying to find a good example.



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



ACL Aro multiple parents Cake 1.2

2007-11-03 Thread Pravalitera

Hi,

source : https://trac.cakephp.org/ticket/2191
>> Cake's built-in ACL should allow for an ARO to have multiple parents. This 
>> would make it possible to give permissions based on groups, and have users 
>> belong to multiple groups.
>This is technically possible with the new 1.2 ACL system. Examples on how to 
>accomplish this will be forthcoming.

Does anybody have an example for this kind of auth ?

Thx !


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---