Re: [web2py] Re: Conditional menu

2010-08-10 Thread Johann Spies
Thanks. That is useful. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

Re: [web2py] Re: Conditional menu

2010-08-09 Thread Thadeus Burgess
Something Ive learned. if you build your menus based on the group permissions, make sure they are logged in too. if auth.is_logged_in() and auth.has_permission('admin', auth.user.id): admin menu elif auth.is_logged_in() user menu else: guest menu -- Thadeus On Mon, Aug 9, 2010 at 9:51

Re: [web2py] Re: Conditional menu

2010-08-09 Thread Johann Spies
Thanks! Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

[web2py] Re: Conditional menu

2010-08-09 Thread mdipierro
response.menu=[] if not auth.user: response.menu.append([T('Login'), False, URL(request.application,'default','user'), []]) else: response.menu.append([T('Logout'), False, URL(request.application,'default','user/logout'), []]) On Aug 9, 9:04 am, Johann Spies wrote: > I see Cube