Jeff Watkins <[EMAIL PROTECTED]> writes:

> Many people wanted something more flexible, and with revision 400,  any of the
> following are valid require decorators:
> 
>      @identity.require( in_group( "admin" ) )
>      @identity.require( in_all_groups( "admin", "editor" ) )
>      @identity.require( in_any_group( "admin", "editor" ) )
>      @identity.require( has_permission( "edit" ) )
>      @identity.require( has_all_permissions( "edit", "delete",  "update" ) )
>      @identity.require( has_any_permission( "edit", "delete",  "update" ) )

I've started playing with this new implementation and am I wrong or is it
needed to import "in_group" et al. from identity.conditions?

Another solution is using:

      @identity.require( identity.conditions.in_group( "admin" ) )

Am I right or am I doing something wrong? :-)

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to