Examples of authorizeRole()


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

            String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + "/" +
                                    messageBoxId;
            String adminRoleName = MessageBoxServiceValueHolder.getInstance().
                    getRealmService().getBootstrapRealmConfiguration().getAdminRoleName();
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
View Full Code Here

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

                                    messageBoxId;
            String adminRoleName = MessageBoxServiceValueHolder.getInstance().
                    getRealmService().getBootstrapRealmConfiguration().getAdminRoleName();
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
View Full Code Here

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

                    getRealmService().getBootstrapRealmConfiguration().getAdminRoleName();
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);
View Full Code Here

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

                                               MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);

        } catch (UserStoreException e) {
View Full Code Here

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

                                               MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
            authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
                                               MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);

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

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

            UserRealm userRealm = adminComponentManager.getRealmForCurrentTenant();
            //TODO ask the best way from security team
            AuthorizationManager authorizationManager = userRealm.getAuthorizationManager();
            authorizationManager.clearRoleAuthorization(role, path, ACTION_WRITE);
            authorizationManager.clearRoleAuthorization(role, path, ACTION_READ);
            authorizationManager.authorizeRole(role, path, ACTION_WRITE);
            authorizationManager.authorizeRole(role, path, ACTION_READ);
            return true;
        } catch (UserStoreException e) {
            throw new CassandraServerManagementException("Error during sharing a resource at path :" + path + " and" +
                    " for role :" + role, e, log);
View Full Code Here

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

            //TODO ask the best way from security team
            AuthorizationManager authorizationManager = userRealm.getAuthorizationManager();
            authorizationManager.clearRoleAuthorization(role, path, ACTION_WRITE);
            authorizationManager.clearRoleAuthorization(role, path, ACTION_READ);
            authorizationManager.authorizeRole(role, path, ACTION_WRITE);
            authorizationManager.authorizeRole(role, path, ACTION_READ);
            return true;
        } catch (UserStoreException e) {
            throw new CassandraServerManagementException("Error during sharing a resource at path :" + path + " and" +
                    " for role :" + role, e, log);
        }
View Full Code Here

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

            AuthorizationManager accessControlAdmin =
                    registry.getUserRealm().getAuthorizationManager();

            if (!accessControlAdmin.isRoleAuthorized(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
                    GadgetPopulator.SYSTEM_GADGETS_PATH, ActionConstants.GET)) {
                accessControlAdmin.authorizeRole(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
                        GadgetPopulator.SYSTEM_GADGETS_PATH, ActionConstants.GET);
            }

            String serverName = CarbonUtils.getServerConfiguration().getFirstProperty("Name");
View Full Code Here

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

            // Creating the default gadget collection resource
            Collection defaultGadgetCollection = registry.newCollection();
            // Set permission for annonymous read
            AuthorizationManager authorizationManager = uReg.getUserRealm().getAuthorizationManager();
            authorizationManager.authorizeRole(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
                    SYSTEM_GS_GADGETS_PATH, ActionConstants.GET);

            /*authorizationManager.authorizeRole(RegistryConstants.GUESTS_ROLE,
                                             SYSTEM_GS_GADGETS_PATH, ActionConstants.GET);*/

 
View Full Code Here

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

                AuthorizationManager accessControlAdmin =
                        registry.getUserRealm().getAuthorizationManager();

                if (!accessControlAdmin.isRoleAuthorized(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
                        REGISTRY_GADGET_STORAGE_PATH, ActionConstants.GET)) {
                    accessControlAdmin.authorizeRole(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
                            REGISTRY_GADGET_STORAGE_PATH, ActionConstants.GET);
                }

                File gadgetsDir = new File(extractedArchiveDir);
                if (gadgetsDir.exists()) {
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.