Hi devs,

I need a clarification about "authorizeRole()' method in
JDBCAuthorizationManager class in org.wso2.carbon.user.core.authorization
package.

I came across this while implementing authorization for Cassandra 1.2. When
I try to set a permission for an INTERNAL role, it ends up in *LINE-A *of below
code snippet.

Can someone please explain what this *bolded* *part *is for?

public void authorizeRole(String roleName, String resourceId, String action)
            throws UserStoreException {

*        for (AuthorizationManagerListener listener :
UMListenerServiceComponent*
*                .getAuthorizationManagerListeners()) {*
*            if (!listener.authorizeRole(roleName, resourceId, action,
this)) {*
*                return; // LINE-A*
*            }*
*        }*

        if (resourceId == null || action == null) {
            log.error("Invalid data provided at authorization code");
            throw new UserStoreException("Invalid data provided");
        }
        roleName = modify(roleName);
        resourceId = modify(resourceId);
        action = modify(action);
        addAuthorizationForRole(roleName,resourceId, action,
UserCoreConstants.ALLOW, true);
    }

Thanks,

-- 
*Bhathiya Jayasekara*
*Software Engineer,*
*WSO2 inc., http://wso2.com*
*
*
*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj*
*Twitter: https://twitter.com/bhathiyax*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to