Re: Strange othAuth Problem - still

2006-08-31 Thread [EMAIL PROTECTED]

Good news :)
it's fixed in othAuth v0.7
the code will be released soon, together with a nice readme!


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



Re: Strange othAuth Problem - still

2006-08-30 Thread HalfBaked

Let me start by saying Thanks.

I found two  $this->redirect statements within the check() function.  I
added exit(); after these two redirects and the problem seems to have
been corrected.

I also determined that I did NOT want to add the exit function to Every
redirect as you stated...  When I had an exit(); after the redirect
that appears in the logout function, I would get a blank page after
logging out instead of being redirected to /pages/home like I was
expecting.
I also removed  exit(); after the redirect that appears in the login
function.  I am not sure if this had any adverse effects...

Again, Thank You Very Much...


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



Re: Strange othAuth Problem - still

2006-08-30 Thread [EMAIL PROTECTED]

Sorry, it's not a bug in cake, it's a feature ^^
just read the comments in the post above
as john says in comment 8, the best way is probably to use return();
that way you don't "kill" the execution, but you stop the current
function from executing, and that's what you want.


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



Re: Strange othAuth Problem - still

2006-08-30 Thread [EMAIL PROTECTED]

Apparently this is a bug in cake
http://cakebaker.wordpress.com/2006/08/28/dont-forget-to-exit-after-a-redirect/

daxroc's code at the pastebin is no longer online, but if you
understand the above you should be able to fix the holes without much
trouble (just add exit functions after every redirect ;))


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



Re: Strange othAuth Problem - still

2006-08-30 Thread [EMAIL PROTECTED]

The good news is crazylegs is working hard on a new version. (v 0.7
beta)
the latest released one is 0.2
we (me & crazylegs) are currently testing and bugfixing the 0.7 beta
in any case, this new version still has the same problem (at least my
revision has, i just checked), but i assure you, fixing this bug is
very highly ranked on the to-do list
(maybe crazy has fixed it in the meanwhile, my version is a few days
older then his)

however, daxroc has proposed a possible fix for v0.2
read this irc log (starting at about 13:00)
daxroc posted his code on the pastebin , it's the original othauth
component but with several exit(); function calls injected in it.
http://irc.cakephp.org/cakephp/viewlog/2006-08-27#1320
you could try that, in the meanwhile we try fixing the bug


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



Strange othAuth Problem - still

2006-08-30 Thread HalfBaked

I attempted to post a new reply to the existing thread at:
http://groups.google.com/group/cake-php/browse_thread/thread/6db1134227826d89/846c8f41a3ab46c2?lnk=st&q=othauth+delete&rnum=1#846c8f41a3ab46c2
But I could not because it is older than 30 days...

I too am trying to use othAuth and most everything seems to work,
except as stated in the above thread, any controller that does not
render a view does not get checked for permissions...
I followed the instructions at
http://wiki.cakephp.org/tutorials:beginners_only to the letter.

Has anyone found a solution to this problem?


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



Re: strange othAuth problem

2006-07-17 Thread yeastinflexion

sigh. i spoke too soon. the actions are being performed regardless of
the if!/die statement. i wasn't refreshing phpMyAdmin. any other ideas?


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



Re: strange othAuth problem

2006-07-17 Thread yeastinflexion

i was reading:
http://groups.google.com/group/cake-php/browse_thread/thread/5a4d967ba6c61b5a/b49aadf718b54165?q=beforefilter&rnum=3#b49aadf718b54165
...and it sounds like a similar problem. does that mean that code is
still being run for some reason even after the check has been
performed?

based on this assumption i think i solved this issue but i want to know
from CraZyLegs or anyone else who knows if this is an appropriate fix.
i had to encapsulate the check() call with a if (!check()) {die();} is
that appropriate? it solved the problem so maybe the installation
readme or the check function itself should be changed to stop running
code? or was i just supposed to think this was obvious (i know that a
lot of times code snippets are just rough examples, but many people use
the othAuth readmy verbatim so i'm concerned if this is a problem of
not adding an exit() then a lot of people might not be because i see a
lot of posted code that is exacly like mine -- no exit() -- and i was
having this problem and so was daxroc, maybe other people just haven't
tested it)


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



Re: strange othAuth problem

2006-07-11 Thread yeastinflexion

i also tested this with the $othAuthRestrictions applied to
app_controller or individual controllers... same effect.

does nobody else have this problem?


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



Re: strange othAuth problem

2006-07-05 Thread yeastinflexion

i just discovered that there is another similar problem with any
action. for example, if you wait long enough for the session to expire,
but then you hit say, Save, the save will commit before you are
redirected to the login page.


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



Re: strange othAuth problem

2006-07-01 Thread yeastinflexion

http://cakephp.org/pastes/show/e6bed617b04b2021f2d907dce2f87eaa


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



Re: strange othAuth problem

2006-07-01 Thread daxroc

//Set restrictions as below Note dont use preceeding or leading slashes
var $othAuthRestrictions =array(
'add',
'edit',
'delete'
);

function beforeFilter()
{
parent::beforeFilter();
}

function delete($id) {
$this->Article->del($id);
//$this->flash('Article deleted.',
$this->viewPath.'/articles/index');
$this->redirect('/articles/index');
}

permissions are
controller/delete
controller/add
controller/edit

add and edit work perfect but delete altho restricted can be called by
anyone
as you can see from the above code i have tested it with a flash but
its still being deleted, before the redirect to the login ?


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



Re: strange othAuth problem

2006-07-01 Thread CraZyLeGs

?!
Paste something to reproduce that please ( in the bin ) just give a
link here


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



strange othAuth problem

2006-06-30 Thread yeastinflexion

daxroc and i are both experiencing a strange problem with othAuth. i
believe we have everything implemented as per instructions and
everything works except one thing: when not logged in, you can call a
restricted action and that action will be performed before you are
redirected to the login page as long as the action didn't render a
view. strange eh? this is true even if a flash is added or even if
permissions are totally removed from the db. it doesn't happen on
actions that render views/elements, even if the render is to a file and
not to the browser. Does anyone else have this problem and does anyone
have a solution? CraZyLeGs?


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