Examples of UIPermissionNode


Examples of org.wso2.carbon.user.mgt.common.UIPermissionNode

        }
    }

    public UIPermissionNode getAllUIPermissions(int tenantId, Registry registry)
            throws UserAdminException {
        UIPermissionNode nodeRoot;
        try {
            Collection regRoot;
            if (tenantId == 0) {
                if (CarbonContext.getCurrentContext().getTenantId() != MultitenantConstants.SUPER_TENANT_ID) {
                    log.error("Illegal access attempt");
                    throw new UserStoreException("Illegal access attempt");
                }
                regRoot = (Collection) registry.get(UserMgtConstants.UI_PERMISSION_ROOT);
                String displayName = regRoot.getProperty(UserMgtConstants.DISPLAY_NAME);
                nodeRoot = new UIPermissionNode(UserMgtConstants.UI_PERMISSION_ROOT, displayName);
            } else {
                regRoot = (Collection) registry.get(UserMgtConstants.UI_ADMIN_PERMISSION_ROOT);
                String displayName = regRoot.getProperty(UserMgtConstants.DISPLAY_NAME);
                nodeRoot = new UIPermissionNode(UserMgtConstants.UI_ADMIN_PERMISSION_ROOT,
                        displayName);
            }
            buildUIPermissionNode(regRoot, nodeRoot, registry, null, null, null);
            return nodeRoot;
        } catch (UserStoreException e) {
View Full Code Here

Examples of org.wso2.carbon.user.mgt.common.UIPermissionNode

        }
    }

    public UIPermissionNode getRolePermissions(String roleName, int tenantId, Registry registry)
            throws UserAdminException {
        UIPermissionNode nodeRoot;
        try {
            Collection regRoot;
            if (tenantId == 0) {
                regRoot = (Collection) registry.get(UserMgtConstants.UI_PERMISSION_ROOT);
                String displayName = regRoot.getProperty(UserMgtConstants.DISPLAY_NAME);
                nodeRoot = new UIPermissionNode(UserMgtConstants.UI_PERMISSION_ROOT, displayName);
            } else {
                regRoot = (Collection) registry.get(UserMgtConstants.UI_ADMIN_PERMISSION_ROOT);
                String displayName = regRoot.getProperty(UserMgtConstants.DISPLAY_NAME);
                nodeRoot = new UIPermissionNode(UserMgtConstants.UI_ADMIN_PERMISSION_ROOT,
                        displayName);
            }
            buildUIPermissionNode(regRoot, nodeRoot, registry, realm.getAuthorizationManager(),
                    roleName, null);
            return nodeRoot;
View Full Code Here

Examples of org.wso2.carbon.user.mgt.common.UIPermissionNode

    }

    private UIPermissionNode getUIPermissionNode(Resource resource, Registry registry,
            boolean isSelected) throws RegistryException {
        String displayName = resource.getProperty(UserMgtConstants.DISPLAY_NAME);
        return new UIPermissionNode(resource.getPath(), displayName, isSelected);
    }
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.