Friday, November 28, 2008

Re: Auth redirect problems [SOLVED]

In the oth_auth.php file in the redirect() function it would make use of the
following code to redirect:

$this->controller->redirect($page);


However the function would edit my $page, therefore I just called the
function directly and it worked:

$this->controller->redirect($_SERVER["HTTP_REFERER"]);

AngeloZanetti wrote:
>
> OK I found the redirect function in that script and have seen that it
> changes the page that the script redirects to I need to dig more to see if
> that is where I should be changing the script or if there is another way I
> can accomplish the redirect to the referrer page.
>
>
>
> AngeloZanetti wrote:
>>
>> Hi guys,
>>
>> In the oth_auth.php file in controllers/components/ I am having a
>> redirect issue for user's who dont have certain rights.
>>
>> For example:
>>
>> Say a user has view and edit permissions but not delete. So the user is
>> viewing a listing of the entries which they can edit etc... but now the
>> user clicks on delete and validation starts. It determines that the user
>> doesn't have permissions and redirects them to the dashboard (index page
>> of their account).
>>
>> What I want is that the user is redirected back to the list that they
>> were busy with instead of being redirected to the dashboard. I have tried
>> to do many things but nothing helps it always redirects to that page:
>>
>> have tried:
>>
>> $this->redirect($_SERVER["HTTP_REFERER"]);
>>
>> have also tried many hard coded values just to see if I could get it
>> manually redirecting but nothing happens.
>>
>> there must be something that is overriding that redirect in the file?
>>
>> Can anyone give me any pointers as to where I am going wrong or if this
>> is a limitation or what I can do to solve/troubleshoot this problem,
>> thanks.
>>
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Auth-redirect-problems-tp20729368p20730402.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: