Examples of authorizeUser()


Examples of org.apache.lenya.cms.ac.Policy.authorizeUser()


        Identity identity = (Identity) session.getAttribute("org.apache.lenya.cms.ac.Identity");

        if (identity != null) {
            if (policy.authorizeUser(action, identity.getUsername())) {
                return true;
            }

            String[] groupname = identity.getGroupnames();
View Full Code Here

Examples of org.wso2.carbon.user.api.AuthorizationManager.authorizeUser()

            String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + "/" +
                                    messageBoxId;

            for (String sharedUser : permissionLabel.getSharedUsers()) {
                for (String operation : permissionLabel.getOperations()) {
                    authorizationManager.authorizeUser(sharedUser, messageBoxPath, operation);
                }
            }
        } catch (UserStoreException e) {
            String error = "Failed to add permissions to " + messageBoxId + " with permission label "
                           + permissionLabel.getLabelName();
View Full Code Here

Examples of org.wso2.carbon.user.api.AuthorizationManager.authorizeUser()

        try {
            AuthorizationManager authorizationManager = Utils.getUserRelam().getAuthorizationManager();

            String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + "/" +
                                    messageBoxId;
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
View Full Code Here

Examples of org.wso2.carbon.user.api.AuthorizationManager.authorizeUser()

            String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + "/" +
                                    messageBoxId;
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
View Full Code Here

Examples of org.wso2.carbon.user.api.AuthorizationManager.authorizeUser()

                                    messageBoxId;
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);
View Full Code Here

Examples of org.wso2.carbon.user.api.AuthorizationManager.authorizeUser()

                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);

        } catch (UserStoreException e) {
View Full Code Here

Examples of org.wso2.carbon.user.api.AuthorizationManager.authorizeUser()

                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
            authorizationManager.authorizeUser(user, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);

        } catch (UserStoreException e) {
            String error = "Failed to allow permissions to user " + user + " for message box " + messageBoxId;
            log.error(error);
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.authorizeUser()

            AuthorizationManager accessControlAdmin =
                    registry.getUserRealm().getAuthorizationManager();
           
            if (!accessControlAdmin.isUserAuthorized(RegistryConstants.ANONYMOUS_USER,
                                             SYSTEM_GADGETS_PATH, ActionConstants.GET))  {
                accessControlAdmin.authorizeUser(RegistryConstants.ANONYMOUS_USER,
                                             SYSTEM_GADGETS_PATH, ActionConstants.GET);
            }
            try {
                registry.beginTransaction();
                registry.put(SYSTEM_GADGETS_PATH, defaultGadgetCollection);
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.authorizeUser()

                String systemUserName = CarbonConstants.REGISTRY_SYSTEM_USERNAME;


                ac.clearResourceAuthorizations("/system");

                ac.authorizeUser(systemUserName, "/system", ActionConstants.GET);
                ac.authorizeUser(systemUserName, "/system", ActionConstants.PUT);
                ac.authorizeUser(systemUserName, "/system", ActionConstants.DELETE);
                ac.authorizeUser(systemUserName, "/system", AccessControlConstants.AUTHORIZE);

                String adminUserName = CarbonConstants.REGISTRY_SYSTEM_USERNAME;
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.authorizeUser()


                ac.clearResourceAuthorizations("/system");

                ac.authorizeUser(systemUserName, "/system", ActionConstants.GET);
                ac.authorizeUser(systemUserName, "/system", ActionConstants.PUT);
                ac.authorizeUser(systemUserName, "/system", ActionConstants.DELETE);
                ac.authorizeUser(systemUserName, "/system", AccessControlConstants.AUTHORIZE);

                String adminUserName = CarbonConstants.REGISTRY_SYSTEM_USERNAME;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.