<meta http-equiv="Content-Type" content="text/html charset=windows-1252">Hi<div>(I dont know much about this, but since noone else has answered)<br>
<br><div><div>21. okt. 2014 kl. 16:24 skrev Michele Sanguillon [via Plone] <<a href="/user/SendEmail.jtp?type=node&node=7572671&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>>:</div><br class="Apple-interchange-newline"><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' type="cite">

        <br>Hello,
<br><br>I installed a Plone 4.2 website and I woulk like it has the same look  
<br>than my old Plone 3.x one.
<br>In this website, I would like to have portal tabs for anonymous users  
<br>of my website and additional portal tabs for authenticated users.
<br>So as on my old website, I add CMF actions in the Site Setup -> ZMI ->  
<br>portal_actions -> portal_tabs with a condition expression :
<br>ID : InstallationSFTP
<br>Title:        Installation / SFTP
<br>I18n Domaine: plone
<br>URL:          string:$portal_url/DBPollux/SetUpDBPolluxSFTPMain
<br>Condition:     
<br>python:portal.portal_membership.getAuthenticatedMember().has_role('Manager') </blockquote></div><div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' type="cite"><br>My problem is that the condition is only evaluated when I start plone  
<br>and not when somebody logs in or out.
<br></blockquote><div><br></div><div>Are you sure about that (try with if user is Anon to check)</div><div>Could it be that the user does not have manager roles to that part of the site?<br></div><div><br></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' type="cite"><br>Can somebody help me ?
<br><br></blockquote><div>Maybe you could write a helper browser view to return the permission?</div><div><br></div><div>If it could be of any help, I do something similar here:</div><div><a href="https://github.com/espenmn/medialog.simpleslider/blob/master/src/medialog/simpleslider/profiles/default/actions.xml" target="_top" rel="nofollow" link="external">https://github.com/espenmn/medialog.simpleslider/blob/master/src/medialog/simpleslider/profiles/default/actions.xml</a></div><div>(the condition)</div><div><br></div><div>which gets it from here:</div><div><a href="https://github.com/espenmn/medialog.simpleslider/blob/master/src/medialog/simpleslider/browser/utils.py#L61" target="_top" rel="nofollow" link="external">https://github.com/espenmn/medialog.simpleslider/blob/master/src/medialog/simpleslider/browser/utils.py#L61</a></div><div>(so line 62 in your case would be: </div><div><br></div><div>return portal.portal_membership.getAuthenticatedMember().has_role(‘Manager')</div><div><br></div><div>Espen</div><br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' type="cite">Thanks in advance,
<br><br>Michele
<br>-- 
<br>Michèle Sanguillon
<br>Laboratoire Univers et Particules de Montpellier
<br>Université Montpellier II - Place E. Bataillon - Bât. 13 - CC 072
<br>34095 Montpellier Cedex
<br>Tel : +33 (0)4 67 14 93 59 - Fax : +33 (0)4 67 14 41 90
<br><br><br>_______________________________________________
<br>UI mailing list
<br><a href="x-msg://31/user/SendEmail.jtp?type=node&amp;node=7572660&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br><a href="https://lists.plone.org/mailman/listinfo/plone-ui" target="_top" rel="nofollow" link="external">https://lists.plone.org/mailman/listinfo/plone-ui</a><br>

        
        
        
        <br>
        <br>
        <hr noshade="noshade" size="1">
        <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://plone.293351.n2.nabble.com/tabs-depending-on-authentication-tp7572660.html" target="_top" rel="nofollow" link="external">http://plone.293351.n2.nabble.com/tabs-depending-on-authentication-tp7572660.html</a>
        </div>
        <div style="color:#666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                To start a new topic under User Interface & Design, email <a href="/user/SendEmail.jtp?type=node&node=7572671&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
                To unsubscribe from Plone, <a href="" target="_top" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://plone.293351.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a>
        </div></blockquote></div><br></div>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://plone.293351.n2.nabble.com/tabs-depending-on-authentication-tp7572660p7572671.html">Re: tabs depending on authentication</a><br/>
Sent from the <a href="http://plone.293351.n2.nabble.com/User-Interface-amp-Design-f293357.html">User Interface & Design mailing list archive</a> at Nabble.com.<br/>