[jboss-user] [JBoss Seam] - roles redirecting methods

zhamdi do-not-reply at jboss.com
Tue Jan 15 07:23:34 EST 2008


Hi,

I'm learning Seam and its role extended features. It's a very big step compared to JAAS but I recognize I expected a more adapted behavior :-/

In fact, the code is always full of test cases that redirect to the corresponding method for a given role if( "role1" ) doThis(); else doThat(); to return a restricted result list or simply overdrive a deature againt the role.

I was suprised Seam didn't adress this common concept, even more because I was very pleased by the other aspects of Seam, espacially conversations.

The idea I imagined to solve code repetition for role testing was sth like an intercepted method :

@RoleSensible
  | void myMethod() { //do common tasks };

then intercepting methods e.g:


  | @RoleCase( method="myMethod" )
  | @Restricted("#{s:hasPermission('bean', 'case1', user)}")
  | void case1() {};
  | 

the annotation I imagined @RoleSensible  should be mandatory, even it's just there only to warn the method will be intercepted.

Do I have to add a feature request? or maybe is it not in the spirit Seam was designed in?

Regards,
Zied hamdi

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120032#4120032

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120032



More information about the jboss-user mailing list