The updated version of SurveyCloud ( https://bitbucket.org/rochacbruno/surveycloud/src/d3ff0ab5bc95/controllers/survey.py) and conf2py ( http://code.google.com/p/conf2py/source/browse/controllers/default.py) both use role based authorization with function decorators. Anthony
On Thursday, February 24, 2011 3:23:48 PM UTC-5, Swell wrote: > I will follow this advice and Jonathan one. Is there some appliance > you would be aware of that have the similar features ? > > On Thu, Feb 24, 2011 at 9:12 PM, Anthony <[email protected]> wrote: > > Have you looked at the web2py authorization functionality: > > http://web2py.com/book/default/chapter/08#Authorization > > > > I would think you could just create two authorization roles and then just > > user decorators to control access to particular actions. E.g.: > > > > @auth.requires_membership('task_acceptors') > > def accept_task(): > > [code for task acceptance] > > > > Anthony > > On Thursday, February 24, 2011 2:48:43 PM UTC-5, Swell wrote: > >> > >> Hi > >> I would like to have some hints about building a small app where i > >> have two types of users ( different roles ). The first role can only > >> post task requests and see the accepted request . The second role can > >> receive tasks and accepts them. Do you recomend me to create two > >> controllers ( one for each role ) and dispatch to the right type of > >> users when the user log in . > >> > >> Thx for your advice. > > > >

