Package org.jboss.dashboard.security

Examples of org.jboss.dashboard.security.Policy.save()


        Constructor principalConstructor = Class.forName(principalClass).getConstructor(new Class[]{String.class});
        DefaultPrincipal principal = (DefaultPrincipal) principalConstructor.newInstance(new Object[]{principalName});
        Policy securityPolicy = SecurityServices.lookup().getSecurityPolicy();
        securityPolicy.addPermission(principal, permission);
        securityPolicy.save();
    }

    /**
     * Transforms the principal name, as it might be modified (group, role, ...)
     *
 
View Full Code Here


                }

                // Remove attached section permissions
                Policy policy = SecurityServices.lookup().getSecurityPolicy();
                policy.removePermissions(section);
                policy.save();

                //Reposition other sections and remove this
                List childSections = section.getChildren();
                int childCount = childSections.size();
View Full Code Here

                    protected void txFragment(Session session) throws Exception {

                        // Remove related permissions
                        Policy policy = SecurityServices.lookup().getSecurityPolicy();
                        policy.removePermissions(instance);
                        policy.save();

                        // Remove panels assigned to workspace's sections.
                        Iterator sectionIt = sections.iterator();
                        while (sectionIt.hasNext()) {
                            Section section = (Section) sectionIt.next();
View Full Code Here

            }
        }

        //Save the policy, as probably everybody modified it...
        Policy securityPolicy = SecurityServices.lookup().getSecurityPolicy();
        securityPolicy.save();

        result.setObjectCreated(workspace);
    }

    protected void createPermission(CreateResult result, Workspace workspace, Object resource, XMLNode node, Map attributes) throws Exception {
View Full Code Here

        Constructor principalConstructor = Class.forName(principalClass).getConstructor(new Class[]{String.class});
        DefaultPrincipal principal = (DefaultPrincipal) principalConstructor.newInstance(new Object[]{principalName});
        Policy securityPolicy = SecurityServices.lookup().getSecurityPolicy();
        securityPolicy.addPermission(principal, permission);
        securityPolicy.save();
    }

    /**
     * Transforms the principal name, as it might be modified (group, role, ...)
     *
 
View Full Code Here

                        panel.getProvider().getDriver().fireBeforePanelRemoved(panel);
                        panel.panelRemoved();
                    }
                }

                policy.save();

                // Delete workspace.
                session.delete(workspace);
                session.flush();
View Full Code Here

                        panel.getProvider().getDriver().fireBeforePanelRemoved(panel);
                        panel.panelRemoved();
                    }
                }

                policy.save();

                // Delete workspace.
                session.delete(workspace);
                session.flush();
View Full Code Here

                }

                // Remove attached section permissions
                Policy policy = SecurityServices.lookup().getSecurityPolicy();
                policy.removePermissions(section);
                policy.save();

                //Reposition other sections and remove this
                List childSections = section.getChildren();
                int childCount = childSections.size();
View Full Code Here

                    protected void txFragment(Session session) throws Exception {

                        // Remove related permissions
                        Policy policy = SecurityServices.lookup().getSecurityPolicy();
                        policy.removePermissions(instance);
                        policy.save();
                        for (Section section : sections) {
                            for (Panel panel : section.getAllPanels()) {
                                if (instance.getInstanceId().equals(panel.getInstanceId())) {
                                    section.removePanel(panel);
View Full Code Here

                }

                // Remove attached section permissions
                Policy policy = SecurityServices.lookup().getSecurityPolicy();
                policy.removePermissions(section);
                policy.save();

                //Reposition other sections and remove this
                List childSections = section.getChildren();
                int childCount = childSections.size();
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.