Allow annotations to be parameterized based on method arguments
---------------------------------------------------------------

                 Key: KI-71
                 URL: https://issues.apache.org/jira/browse/KI-71
             Project: Ki
          Issue Type: Improvement
          Components: Authorization (access control)
    Affects Versions: 0.9-RC1
            Reporter: Jeremy Haile
            Assignee: Jeremy Haile
             Fix For: 1.0


This would allow annotations to include dynamic values based on the String 
values of method arguments.

For example:

@RequiresPermissions( "editUser:${userId}" )
public void editUser( String userId ) {
 ...
}

If the method was called as editUser( 3 ), JSecurity would then check the 
permission "editUser:3" and if the current subject doesn't have the permission, 
an AuthorizationException would be thrown.

This should also work for the @RequiresRoles permission.  An exception should 
also be thrown if the parameter specified cannot be found as a method argument.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to