Re: Kohana_3: problem with logging out if on the profile page

Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> Mon, 10 Jun 2013 17:21:45 +0200
Newsgroups gmane.comp.web.gallery.devel
Message-ID <CA+z51A6EmA-zyKgRWy-+w04pJ2WHE7Qk3h5=9gEtjB57qAk4PA@mail.gmail.com>
--===============3460170095603927912==
Content-Type: multipart/alternative; boundary=047d7bdc7722eaa0bd04dece57f4

--047d7bdc7722eaa0bd04dece57f4
Content-Type: text/plain; charset=UTF-8

Hey Tal,

Nice catch!  Yep, option 2 is definitely a better way to go, and can be
done by using Controller::check_auth().  I think I fixed it here:
https://github.com/shadlaws/gallery3/commit/012eaf78b5b078a6d73487bcf1791fc622e686c8

Take care,
Shad


On 10 June 2013 06:40, Tim Almdal <[email protected]> wrote:

>  I have time to fix this one as well.
>
> Login as administrator; click the link to bring up the administrator
> profile, then logout... boom
>
> The problem is that the we don't use the admin theme for the user profile
> page, so it then checks to see if there is an item and since there is
> nothing in this gallery, that's null, so the continue_url is set to the
> current page (show profile)... Logout works and now we have a guest user
> and we try to display the profile... which then fails.
>
> Only options I can think of are:
>
>    1. hacky code in Gallery Event that checks that the current page is
>    the profile page and set the current url to the index page instead;
>     2. Or, the show profile script checks that the user is valid before
>    trying to do anything and if the user is the guest, redirect to the main
>    index page
>
> Any other ideas
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> __[ g a l l e r y - d e v e l ]_________________________
>
> [ list info/archive --> http://gallery.sf.net/lists.php ]
> [ gallery info/FAQ/download --> http://gallery.sf.net ]
>

--047d7bdc7722eaa0bd04dece57f4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hey Tal,<div><br></div><div>Nice catch! =C2=A0Yep, option 2 is definitely a=
 better way to go, and can be done by using Controller::check_auth(). =C2=
=A0I think I fixed it here:</div><div><a href=3D"https://github.com/shadlaw=
s/gallery3/commit/012eaf78b5b078a6d73487bcf1791fc622e686c8">https://github.=
com/shadlaws/gallery3/commit/012eaf78b5b078a6d73487bcf1791fc622e686c8</a></=
div>

<div><br></div><div>Take care,</div><div>Shad</div><div><br><br><div class=
=3D"gmail_quote">On 10 June 2013 06:40, Tim Almdal <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt=
;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
 =20

   =20
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF">
    I have time to fix this one as well.<br>
    <br>
    Login as administrator; click the link to bring up the administrator
    profile, then logout... boom<br>
    <br>
    The problem is that the we don&#39;t use the admin theme for the user
    profile page, so it then checks to see if there is an item and since
    there is nothing in this gallery, that&#39;s null, so the continue_url
    is set to the current page (show profile)... Logout works and now we
    have a guest user and we try to display the profile... which then
    fails.<br>
    <br>
    Only options I can think of are:<br>
    <ol>
      <li>hacky code in Gallery Event that checks that the current page
        is the profile page and set the current url to the index page
        instead; <br>
      </li>
      <li>Or, the show profile script checks that the user is valid
        before trying to do anything and if the user is the guest,
        redirect to the main index page</li>
    </ol>
    Any other ideas<br>
    <br>
  </div>


<br>-----------------------------------------------------------------------=
-------<br>
How ServiceNow helps IT people transform IT departments:<br>
1. A cloud service to automate IT design, transition and operations<br>
2. Dashboards that offer high-level views of enterprise services<br>
3. A single system of record for all IT processes<br>
<a href=3D"http://p.sf.net/sfu/servicenow-d2d-j" target=3D"_blank">http://p=
.sf.net/sfu/servicenow-d2d-j</a><br>__[ g a l l e r y - d e v e l ]________=
_________________<br>
<br>
[ list info/archive --&gt; <a href=3D"http://gallery.sf.net/lists.php" targ=
et=3D"_blank">http://gallery.sf.net/lists.php</a> ]<br>
[ gallery info/FAQ/download --&gt; <a href=3D"http://gallery.sf.net" target=
=3D"_blank">http://gallery.sf.net</a> ]<br></blockquote></div><br></div>

--047d7bdc7722eaa0bd04dece57f4--


--===============3460170095603927912==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
--===============3460170095603927912==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

__[ g a l l e r y - d e v e l ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
--===============3460170095603927912==--