Package org.jboss.dashboard.users

Examples of org.jboss.dashboard.users.RolesManager


     * Below is a list of permissions granted by default.
     */
    public synchronized void grantDefaultPermissions() {
        log.debug("Grant default permissions.");

        RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
        WorkspacesManager workspacesManager = UIServices.lookup().getWorkspacesManager();
        SectionPermission sectionPerm = new SectionPermission("*", SectionPermission.ACTION_VIEW);
        sectionPerm.setReadOnly(true);
        PanelPermission panelPerm = new PanelPermission("*", PanelPermission.ACTION_VIEW);
        panelPerm.setReadOnly(true);

        // All roles can view all sections and panels
        for (Role role : rolesManager.getAllRoles()) {
            RolePrincipal rolePrincipal = new RolePrincipal(role);
            defaultPermissions.add(new Object[] {rolePrincipal, sectionPerm});
            defaultPermissions.add(new Object[] {rolePrincipal, panelPerm});

            // Give users with pure role "admin" some global permissions
View Full Code Here


                    UIServices.lookup().getWorkspacesManager().addNewWorkspace(newWorkspace);
                    getNavigationManager().setCurrentWorkspace(newWorkspace);
                }}.execute();

                // Add default access/admin permissions to the roles the creator user belongs to.
                RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
                UIPolicy policy = (UIPolicy) SecurityServices.lookup().getSecurityPolicy();
                List<Permission> defaultPermissions = policy.createDefaultPermissions(newWorkspace);
                for (String roleId : UserStatus.lookup().getUserRoleIds()) {
                    Role role = rolesManager.getRoleById(roleId);
                    RolePrincipal prpal = new RolePrincipal(role);
                    for (Permission perm : defaultPermissions) {
                        policy.addPermission(prpal, perm);
                    }
                }
View Full Code Here

                    UIServices.lookup().getWorkspacesManager().addNewWorkspace(newWorkspace);
                    getNavigationManager().setCurrentWorkspace(newWorkspace);
                }}.execute();

                // Add default access/admin permissions to the roles the creator user belongs to.
                RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
                UIPolicy policy = (UIPolicy) SecurityServices.lookup().getSecurityPolicy();
                List<Permission> defaultPermissions = policy.createDefaultPermissions(newWorkspace);
                for (String roleId : UserStatus.lookup().getUserRoleIds()) {
                    Role role = rolesManager.getRoleById(roleId);
                    RolePrincipal prpal = new RolePrincipal(role);
                    for (Permission perm : defaultPermissions) {
                        policy.addPermission(prpal, perm);
                    }
                }
View Full Code Here

                    UIServices.lookup().getWorkspacesManager().addNewWorkspace(newWorkspace);
                    getNavigationManager().setCurrentWorkspace(newWorkspace);
                }}.execute();

                // Add default access/admin permissions to the roles the creator user belongs to.
                RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
                UIPolicy policy = (UIPolicy) SecurityServices.lookup().getSecurityPolicy();
                List<Permission> defaultPermissions = policy.createDefaultPermissions(newWorkspace);
                for (String roleId : UserStatus.lookup().getUserRoleIds()) {
                    Role role = rolesManager.getRoleById(roleId);
                    RolePrincipal prpal = new RolePrincipal(role);
                    for (Permission perm : defaultPermissions) {
                        policy.addPermission(prpal, perm);
                    }
                }
View Full Code Here

     * Below is a list of permissions granted by default.
     */
    public synchronized void grantDefaultPermissions() {
        log.debug("Grant default permissions.");

        RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
        WorkspacesManager workspacesManager = UIServices.lookup().getWorkspacesManager();
        SectionPermission sectionPerm = new SectionPermission("*", SectionPermission.ACTION_VIEW);
        sectionPerm.setReadOnly(true);
        PanelPermission panelPerm = new PanelPermission("*", PanelPermission.ACTION_VIEW);
        panelPerm.setReadOnly(true);

        // All roles can view all sections and panels
        for (Role role : rolesManager.getAllRoles()) {
            RolePrincipal rolePrincipal = new RolePrincipal(role);
            defaultPermissions.add(new Object[] {rolePrincipal, sectionPerm});
            defaultPermissions.add(new Object[] {rolePrincipal, panelPerm});

            // Give users with pure role "admin" some global permissions
View Full Code Here

                    UIServices.lookup().getWorkspacesManager().addNewWorkspace(newWorkspace);
                    getNavigationManager().setCurrentWorkspace(newWorkspace);
                }}.execute();

                // Add default access/admin permissions to the roles the creator user belongs to.
                RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
                UIPolicy policy = (UIPolicy) SecurityServices.lookup().getSecurityPolicy();
                List<Permission> defaultPermissions = policy.createDefaultPermissions(newWorkspace);
                for (String roleId : UserStatus.lookup().getUserRoleIds()) {
                    Role role = rolesManager.getRoleById(roleId);
                    RolePrincipal prpal = new RolePrincipal(role);
                    for (Permission perm : defaultPermissions) {
                        policy.addPermission(prpal, perm);
                    }
                }
View Full Code Here

     * Below is a list of permissions granted by default.
     */
    public synchronized void grantDefaultPermissions() {
        log.debug("Grant default permissions.");

        RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
        WorkspacesManager workspacesManager = UIServices.lookup().getWorkspacesManager();
        SectionPermission sectionPerm = new SectionPermission("*", SectionPermission.ACTION_VIEW);
        PanelPermission panelPerm = new PanelPermission("*", PanelPermission.ACTION_VIEW);

        // All roles can view all sections and panels
        for (Role role : rolesManager.getAllRoles()) {
            RolePrincipal rolePrincipal = new RolePrincipal(role);
            defaultPermissions.add(new Object[] {rolePrincipal, sectionPerm});
            defaultPermissions.add(new Object[] {rolePrincipal, panelPerm});

            // Give users with pure role "admin" some global permissions
View Full Code Here

                    UIServices.lookup().getWorkspacesManager().addNewWorkspace(newWorkspace);
                    getNavigationManager().setCurrentWorkspace(newWorkspace);
                }}.execute();

                // Add default access/admin permissions to the roles the creator user belongs to.
                RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
                UIPolicy policy = (UIPolicy) SecurityServices.lookup().getSecurityPolicy();
                List<Permission> defaultPermissions = policy.createDefaultPermissions(newWorkspace);
                for (String roleId : UserStatus.lookup().getUserRoleIds()) {
                    Role role = rolesManager.getRoleById(roleId);
                    RolePrincipal prpal = new RolePrincipal(role);
                    for (Permission perm : defaultPermissions) {
                        policy.addPermission(prpal, perm);
                    }
                }
View Full Code Here

     * Below is a list of permissions granted by default.
     */
    public synchronized void grantDefaultPermissions() {
        log.debug("Grant default permissions.");

        RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
        WorkspacesManager workspacesManager = UIServices.lookup().getWorkspacesManager();
        SectionPermission sectionPerm = new SectionPermission("*", SectionPermission.ACTION_VIEW);
        sectionPerm.setReadOnly(true);
        PanelPermission panelPerm = new PanelPermission("*", PanelPermission.ACTION_VIEW);
        panelPerm.setReadOnly(true);

        // All roles can view all sections and panels
        for (Role role : rolesManager.getAllRoles()) {
            RolePrincipal rolePrincipal = new RolePrincipal(role);
            defaultPermissions.add(new Object[] {rolePrincipal, sectionPerm});
            defaultPermissions.add(new Object[] {rolePrincipal, panelPerm});

            // Give users with pure role "admin" some global permissions
View Full Code Here

     * Below is a list of permissions granted by default.
     */
    public synchronized void grantDefaultPermissions() {
        log.debug("Grant default permissions.");

        RolesManager rolesManager = SecurityServices.lookup().getRolesManager();
        WorkspacesManager workspacesManager = UIServices.lookup().getWorkspacesManager();
        SectionPermission sectionPerm = new SectionPermission("*", SectionPermission.ACTION_VIEW);
        sectionPerm.setReadOnly(true);
        PanelPermission panelPerm = new PanelPermission("*", PanelPermission.ACTION_VIEW);
        panelPerm.setReadOnly(true);

        // All roles can view all sections and panels
        for (Role role : rolesManager.getAllRoles()) {
            RolePrincipal rolePrincipal = new RolePrincipal(role);
            defaultPermissions.add(new Object[] {rolePrincipal, sectionPerm});
            defaultPermissions.add(new Object[] {rolePrincipal, panelPerm});

            // Give users with pure role "admin" some global permissions
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.users.RolesManager

Copyright © 2018 www.massapicom. 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.