Re: ACL problem of the different kind: it allows too much!

2010-09-06 Thread nils
solved.

Stupid me, but maybe me reporting this helps others: I overwrote
beforefilter in my controller and didn't add auth to it.

Including "parent::beforeFilter();" in beforeFilter() in said
controllers fixed all issues.

:/



On 1 Sep., 12:04, nils  wrote:
> Hi gomes, thanks for your reply
>
> acos are updated, components registered and I put in those lines in
> beforeFilter.
>
> Auth *does* work on other controllers/actions, it just doesn't on that
> one!
>
> Anyone got some spare clue?
>
> tia,nils
>
> On 1 Sep., 09:51, "gome$"  wrote:
>
> > HiNils,
>
> > Have you updated ACOs table before restricting actions (build_acl)?
> > Make shure you have included Acl and Auth components in your
> > AppController  ?
> > ( var $components = array('Acl', 'Auth', 'Session'); )
> > and you have following lines in beforeFilter:
> > $this->Auth->actionPath = 'controllers/';
> > $this->Auth->authorize = 'actions';
>
> > regards
> > gomes
>
> > On 31 Sie, 16:58,nils wrote:
>
> > > btw: no, I didn't leave any
>
> > > $this->Auth->allow('*');
>
> > > in there.. - It works fine on *some* methods, but not on all! :(
>
> > > On 31 Aug., 16:51,nils wrote:
>
> > > > Hi all,
>
> > > > got a bit of an acl/auth problem here...:
>
> > > > my usergroup with very few rights should be restricted to few methods.
> > > > Thus I defined:
>
> > > >                 $group->id = 7;
> > > >                 $this->Acl->deny($group, 'controllers');
> > > >                 $this->Acl->deny($group, 'controllers/Messages/index'); 
> > > > // this just
> > > > because I thought that might help!
> > > >                 $this->Acl->allow($group, 'controllers/Messages/inbox');
> > > >                 $this->Acl->allow($group, 
> > > > 'controllers/Messages/outbox');
>
> > > > But still: all methods are still "allowed" for users of that group
> > > > (e.g. index, view, add)!
>
> > > > I checked: there's no manual override put in place by me, neither in
> > > > the messages controller, nor in app controller.
>
> > > > (Certainly, I could put a manual check in each method, checking wether
> > > > a user belongs to the admin group, but that's all a bit beside the
> > > > point now, isn't it?)
>
> > > > Can anyone shed some light on this, pretty please?
>
> > > > Everything else is mostly doing fine. I copied the auth part from the
> > > > cookbook and am using cake 1.3 fwiw
>
> > > > Thanks for your help in advance!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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: List of error? Or better: how to use a default error-view if none is present?

2010-09-02 Thread nils
Thank you, my grace! ;)
- The nuts and bolts one actually helped a lot!

cheers!

nils

On 1 Sep., 19:22, cricket  wrote:
> On Wed, Sep 1, 2010 at 8:38 AM, nils  wrote:
> > I tested my system today and got a "MISSING METHOD"-error. -
> > Interesting. So I created a view for that.
>
> > - But is there a way to set a default view for errors, in case none is
> > present?
>
> > Just using one view for all errors would suffice, shirley..
>
> Please don't call me shirley. :-)
>
> Have a look 
> here:http://book.cakephp.org/view/154/Error-Handlinghttp://nuts-and-bolts-of-cakephp.com/2008/08/29/dealing-with-errors-i...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


List of error? Or better: how to use a default error-view if none is present?

2010-09-01 Thread nils
I tested my system today and got a "MISSING METHOD"-error. -
Interesting. So I created a view for that.

- But is there a way to set a default view for errors, in case none is
present?

Just using one view for all errors would suffice, shirley..

Thanks in advance for your time + effort!

nils

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 problem of the different kind: it allows too much!

2010-09-01 Thread nils
Hi gomes, thanks for your reply

acos are updated, components registered and I put in those lines in
beforeFilter.

Auth *does* work on other controllers/actions, it just doesn't on that
one!

Anyone got some spare clue?

tia, nils


On 1 Sep., 09:51, "gome$"  wrote:
> Hi Nils,
>
> Have you updated ACOs table before restricting actions (build_acl)?
> Make shure you have included Acl and Auth components in your
> AppController  ?
> ( var $components = array('Acl', 'Auth', 'Session'); )
> and you have following lines in beforeFilter:
> $this->Auth->actionPath = 'controllers/';
> $this->Auth->authorize = 'actions';
>
> regards
> gomes
>
> On 31 Sie, 16:58, nils  wrote:
>
> > btw: no, I didn't leave any
>
> > $this->Auth->allow('*');
>
> > in there.. - It works fine on *some* methods, but not on all! :(
>
> > On 31 Aug., 16:51, nils  wrote:
>
> > > Hi all,
>
> > > got a bit of an acl/auth problem here...:
>
> > > my usergroup with very few rights should be restricted to few methods.
> > > Thus I defined:
>
> > >                 $group->id = 7;
> > >                 $this->Acl->deny($group, 'controllers');
> > >                 $this->Acl->deny($group, 'controllers/Messages/index'); 
> > > // this just
> > > because I thought that might help!
> > >                 $this->Acl->allow($group, 'controllers/Messages/inbox');
> > >                 $this->Acl->allow($group, 'controllers/Messages/outbox');
>
> > > But still: all methods are still "allowed" for users of that group
> > > (e.g. index, view, add)!
>
> > > I checked: there's no manual override put in place by me, neither in
> > > the messages controller, nor in app controller.
>
> > > (Certainly, I could put a manual check in each method, checking wether
> > > a user belongs to the admin group, but that's all a bit beside the
> > > point now, isn't it?)
>
> > > Can anyone shed some light on this, pretty please?
>
> > > Everything else is mostly doing fine. I copied the auth part from the
> > > cookbook and am using cake 1.3 fwiw
>
> > > Thanks for your help in advance!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 problem of the different kind: it allows too much!

2010-08-31 Thread nils
btw: no, I didn't leave any

$this->Auth->allow('*');

in there.. - It works fine on *some* methods, but not on all! :(


On 31 Aug., 16:51, nils  wrote:
> Hi all,
>
> got a bit of an acl/auth problem here...:
>
> my usergroup with very few rights should be restricted to few methods.
> Thus I defined:
>
>                 $group->id = 7;
>                 $this->Acl->deny($group, 'controllers');
>                 $this->Acl->deny($group, 'controllers/Messages/index'); // 
> this just
> because I thought that might help!
>                 $this->Acl->allow($group, 'controllers/Messages/inbox');
>                 $this->Acl->allow($group, 'controllers/Messages/outbox');
>
> But still: all methods are still "allowed" for users of that group
> (e.g. index, view, add)!
>
> I checked: there's no manual override put in place by me, neither in
> the messages controller, nor in app controller.
>
> (Certainly, I could put a manual check in each method, checking wether
> a user belongs to the admin group, but that's all a bit beside the
> point now, isn't it?)
>
> Can anyone shed some light on this, pretty please?
>
> Everything else is mostly doing fine. I copied the auth part from the
> cookbook and am using cake 1.3 fwiw
>
> Thanks for your help in advance!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 problem of the different kind: it allows too much!

2010-08-31 Thread nils
Hi all,

got a bit of an acl/auth problem here...:

my usergroup with very few rights should be restricted to few methods.
Thus I defined:

$group->id = 7;
$this->Acl->deny($group, 'controllers');
$this->Acl->deny($group, 'controllers/Messages/index'); // this 
just
because I thought that might help!
$this->Acl->allow($group, 'controllers/Messages/inbox');
$this->Acl->allow($group, 'controllers/Messages/outbox');

But still: all methods are still "allowed" for users of that group
(e.g. index, view, add)!

I checked: there's no manual override put in place by me, neither in
the messages controller, nor in app controller.

(Certainly, I could put a manual check in each method, checking wether
a user belongs to the admin group, but that's all a bit beside the
point now, isn't it?)

Can anyone shed some light on this, pretty please?

Everything else is mostly doing fine. I copied the auth part from the
cookbook and am using cake 1.3 fwiw

Thanks for your help in advance!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 + allow question..

2010-06-23 Thread nils
Got a bit further now: it looks as if it's due to used elements (and
controllers referenced in them) that I have to allow so many
controllers..

Still: where does it start, where does it stop?

I use an element that's referencing a controller/action. Now it
*should* be enough to open up (just) that controller, no?
- But I still need to open up so many more..

C'mon Mr. Auth guru, you must be out there! Show yourself and offer
some clue, please! ;)

On 23 Jun., 09:08, nils  wrote:
> Hm, no takers?
>
> Ok, I now included *all* controllers with the other user-groups, and
> that works all right. But that can't be it, really, can it?
>
> What's the rule re what to allow here? - If I do a simple find (eg.
> $this->User->Country->find('list');), do I have to include the country
> controller in the "allow" rules?
>
> I'm pro'ly just missing a tiny, tiny something, so if someone could
> shed some light on that, I'd be overjoyed! :)
>
> tia,
>
> nils
>
> On 22 Jun., 16:42, nils  wrote:
>
> > I'm having my acl etc all properly installed all right, but as soon as
> > I try to log into my site using anything apart from the holy admin
> > account ("$this->Acl->allow($group, 'controllers');") it doesn't work.
>
> > My idea is, that this could be because my Users Model is associated
> > with heaps of other Tables/Models.
>
> > Could it be that I need to "allow" every associated model/controller
> > to make it work?
>
> > Please supply some clue, if you can spare any.. ;)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 + allow question..

2010-06-23 Thread nils
Hm, no takers?

Ok, I now included *all* controllers with the other user-groups, and
that works all right. But that can't be it, really, can it?

What's the rule re what to allow here? - If I do a simple find (eg.
$this->User->Country->find('list');), do I have to include the country
controller in the "allow" rules?

I'm pro'ly just missing a tiny, tiny something, so if someone could
shed some light on that, I'd be overjoyed! :)

tia,

nils

On 22 Jun., 16:42, nils  wrote:
> I'm having my acl etc all properly installed all right, but as soon as
> I try to log into my site using anything apart from the holy admin
> account ("$this->Acl->allow($group, 'controllers');") it doesn't work.
>
> My idea is, that this could be because my Users Model is associated
> with heaps of other Tables/Models.
>
> Could it be that I need to "allow" every associated model/controller
> to make it work?
>
> Please supply some clue, if you can spare any.. ;)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 + allow question..

2010-06-22 Thread nils
I'm having my acl etc all properly installed all right, but as soon as
I try to log into my site using anything apart from the holy admin
account ("$this->Acl->allow($group, 'controllers');") it doesn't work.

My idea is, that this could be because my Users Model is associated
with heaps of other Tables/Models.

Could it be that I need to "allow" every associated model/controller
to make it work?

Please supply some clue, if you can spare any.. ;)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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: "Message" Model with Sender and Recipient from User-Table

2010-06-04 Thread nils
Jeremy,

thanks for the link, it was a bit buried in the depths of The Book, so
I didn't find it at first. Will check there now.. - Initial test
wasn't working, but I'll be getting there (I hope)! ;)

cheers!

nils


On 4 Jun., 15:28, Jeremy Burns  wrote:
> Actually, looking at this a bit more, I'd like to pose a few questions.
>
> The general way of relating one table to another twice is that you give each 
> a different class name - in your case Sender and Recipient. You then do a 
> normal join, specifying the class name (User in your case) of the joining 
> table and then specify the foreign key - what are they in your case? I guess 
> the id column in the users table is User.id. What are the local keys in the 
> messages table? Are thy Message.sender_id and Message.recipient_id? If so, 
> the proper syntax would be:
>
>         var $hasOne = array(
>             'Sender' => array(
>                         'className' => 'User',
>                         'foreignKey' => 'sender_id'
>                 ),
>             'Recipient' => array(
>                         'className' => 'User',
>                         'foreignKey' => 'recipient_id'
>                 )
>         );
>
> See here for more 
> details:http://book.cakephp.org/view/1046/Multiple-relations-to-the-same-model
>
> Jeremy Burns
> jeremybu...@me.com
> (Skype) +44 208 123 3822 (jeremy_burns)
> (m) +44 7973 481949
> (h) +44 208 530 7573
>
> On 4 Jun 2010, at 14:18, Jeremy Burns wrote:
>
> > Try:
> >    var $hasOne = array(
> >        'Sender' => array(
> >                    'className' => 'User',
> >                    'foreignKey' => 'sender',
> >                    'conditions' => 'User.id = Message.sender',
> >                    'fields' => '',
> >                    'order' => ''
> >            ),
> >        'Recipient' => array(
> >                    'className' => 'User',
> >                    'foreignKey' => 'recipient',
> >                    'conditions' => 'User.id = Message.recipient',
> >                    'fields' => '',
> >                    'order' => ''
> >            )
> >    );
>
> > Jeremy Burns
> > jeremybu...@me.com
>
> > On 4 Jun 2010, at 14:17, nils wrote:
>
> >> Hi all,
>
> >> I've got a "messages" model with two fields called "sender" and
> >> "recipient" which I'd like to link to the users table.
>
> >> I tried:
> >> -->
> >>        var $hasOne = array(
> >>            'User' => array(
> >>                        'className' => 'User',
> >>                        'foreignKey' => 'sender',
> >>                        'conditions' => 'User.id = Message.sender',
> >>                        'fields' => '',
> >>                        'order' => ''
> >>                ),
> >>            'User' => array(
> >>                        'className' => 'User',
> >>                        'foreignKey' => 'recipient',
> >>                        'conditions' => 'User.id = Message.recipient',
> >>                        'fields' => '',
> >>                        'order' => ''
> >>                )
> >>        );
> >> <--
>
> >> ..which doesn't lead to anything, although it *looks* obvious! :)
>
> >> Any ideas?
>
> >> TIA,
>
> >> nils
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> >> with their CakePHP related questions.
>
> >> 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 
> >> athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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: "Message" Model with Sender and Recipient from User-Table

2010-06-04 Thread nils
nah, doesn't work.. :/

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


"Message" Model with Sender and Recipient from User-Table

2010-06-04 Thread nils
Hi all,

I've got a "messages" model with two fields called "sender" and
"recipient" which I'd like to link to the users table.

I tried:
-->
var $hasOne = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'sender',
'conditions' => 'User.id = Message.sender',
'fields' => '',
'order' => ''
),
'User' => array(
'className' => 'User',
'foreignKey' => 'recipient',
'conditions' => 'User.id = Message.recipient',
'fields' => '',
'order' => ''
)
);
<--

..which doesn't lead to anything, although it *looks* obvious! :)

Any ideas?

TIA,

nils

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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: i18n / l10n Problem with Cake 1.3

2010-05-13 Thread nils
Miles, thanks a bunch, that was it.

Damn, I lost a whole day on that.. Documentation should really be
improved here! :/

I'll be heading over to book.cakephp.org right away and add that to
the i18n section as a comment..

Have a good one!

nils


On May 12, 7:16 pm, Miles J  wrote:
> If you want German, its "deu" and not "ger". I ran into this problem
> also.
>
> On May 12, 8:53 am, John Andersen  wrote:
>
>
>
>
>
> > Check that your directory names and file names are in the expected
> > case (upper/lower)!
> > Ensure that CakePHP have read access to the directories!
> > Hope this helps you,
> >    John
>
> > On May 12, 5:35 pm, nils  wrote:
>
> > > Hi all,
>
> > > ok, I got:
>
> > > - "Configure::write('Config.language', 'ger');" in bootstrap (tried
> > > core, too!)
> > > - "C:\stuff\xampp\htdocs\caketest\app\locale\ger\LC_MESSAGES
> > > \default.po" in place (pot created with cake i18n, renamed to .po)
> > > - "" in my ctp
>
> > > ..and it still doesn't work!
>
> > > Drives me insane, I must be missing some ultra-important thing here,
> > > though there aren't even any error messages!
>
> > > Help, pretty please! :)
>
> > > nils
>
> > > ps: and it won't use my english .po either.. :/
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


i18n / l10n Problem with Cake 1.3

2010-05-12 Thread nils
Hi all,

ok, I got:

- "Configure::write('Config.language', 'ger');" in bootstrap (tried
core, too!)
- "C:\stuff\xampp\htdocs\caketest\app\locale\ger\LC_MESSAGES
\default.po" in place (pot created with cake i18n, renamed to .po)
- "" in my ctp

..and it still doesn't work!

Drives me insane, I must be missing some ultra-important thing here,
though there aren't even any error messages!

Help, pretty please! :)

nils

ps: and it won't use my english .po either.. :/

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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