[daisy] ACL check if a user in role x is loged in

Karel Vervaeke karel at outerthought.org
Mon Jun 2 11:16:49 CEST 2008


You can change the conditions on which the role switch is rendered by
creating your own skin in which you change menu.xsl.  

While having a closer look at the default menu.xsl it seems that you can
achieve the desired result even with the default menu.xsl:

(this comment comes from menu.xsl)
<!-- The role-switching menu is only shown if the user has a default
role or if the user has the administrator role. Otherwise, all roles of
the user are active at once and the user doesn't really need the ability
to switch roles. -->

(Meaning you should not set a default role for the customers.)

HTH,
Karel

On Mon, 2008-06-02 at 10:33 +0200, Aleksandar Lazic wrote:
> Hi Karel,
> 
> thanks for answer.
> 
> On Mon 02.06.2008 09:24, Karel Vervaeke wrote:
> >If you give a user two roles (say 'guest' and 'editor') than he or she
> >is able to switch between the two roles using the menu bar.
> 
> Is it possible do deactvate this feature due the fact tha some
> 'customers' don't need to 'See' that a role change is possible ;-)?
> 
> >For more info about how you can set up users and the ACL, check the
> >documentation:
> >
> >???????????????http://cocoondev.org/daisydocs-1_3/repository/general/37-cd.html
> >http://cocoondev.org/daisydocs-1_3/repository/general/19-cd.html
> >???http://cocoondev.org/daisydocs-1_3/repository/general/9-cd.html
> 
> Thanks I have seen this but maybe not fully understand, I'am new to
> daisy.
> 
> >The most simple ACL that you need to get started looks like this:
> >
> >If true:
> >  role:guest (read-only access)
> >  role:editor (read/write access)
> 
> Ok, this means there is no rule / test for is a user logged in or not it
> works with ACL.
> 
> I have thought in programming way:
> 
> if user logged in then ...
> if user not logged in then ...
> 
> I will take more time to learn the Daisy conzept ;-)
> 
> >HTH,
> 
> Yes, thanks.
> 
> >Karel
> 
> Aleks
> 
> ###
> >On Sun, 2008-06-01 at 11:19 +0200, Aleksandar Lazic wrote:
> >> Hi all,
> >> 
> >> I have just started with daisy and from the first view it is very very
> >> nice ;-)).
> >> 
> >> I have take a look into the searchable Archive but haven't found the
> >> right answer, maybe I have searched with wrong words.
> >> 
> >> Please can anybody point in to the right way so that I can find a
> >> solution for the follwoing issue:
> >> 
> >> I have a role 'x' and of course some other.
> >> 
> >> User have role 'x' and login then he is able to see the site with the
> >> documents for 'anonymous (normal Websurfer)' and for role 'x'.
> >> 
> >> I'am now in the 'Edit ACL' page and need a 'If expression'.
> >> 
> >> I thought something like:
> >> 
> >> select request.logid() = true
> >> 
> >> or similar.
> >> 
> >> Many thanks for help
> >> 
> >> Aleksandar Lazic
> >> _______________________________________________
> >> daisy community mailing list
> >> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> >> mail to: daisy at lists.cocoondev.org
> >> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> >_______________________________________________
> >daisy community mailing list
> >Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> >mail to: daisy at lists.cocoondev.org
> >list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list