enabledOnUserRole attribute malfunction
---------------------------------------

         Key: MYFACES-456
         URL: http://issues.apache.org/jira/browse/MYFACES-456
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: Nightly Build    
 Environment: any
 Reporter: Zoltan Kiss


The enabledOnUserRole attribute of the tags in the the 
http://myfaces.apache.org/extensions taglib is not working properly. If I use 
this attribute with a role which is not assigned with the  current logged in 
user, the component will be enabled, and not diasabled.

As I see the problem is, that all class in the 
org.apache.myfaces.renderkit.html.ext which have isDisabled function is 
returning false where they should return true.
Eg. the current code is:
    protected boolean isDisabled(FacesContext facesContext, UIComponent 
uiComponent) {
        if ( ! UserRoleUtils.isEnabledOnUserRole(uiComponent) ) {
            return false;
        }  else {
            return super.isDisabled(facesContext, uiComponent);
        }
    }
 
But it sould be 'return true;'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to