Package org.jboss.dashboard.security.principals

Examples of org.jboss.dashboard.security.principals.DefaultPrincipal


        principalName = transformPrincipalName(principalName, principalClass, attributes);
        permission.setReadOnly(readonly != null && readonly.equals("true"));

        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();
    }
View Full Code Here


        principalName = transformPrincipalName(principalName, principalClass, attributes);
        permission.setReadOnly(readonly != null && readonly.equals("true"));

        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();
    }
View Full Code Here

        principalName = transformPrincipalName(principalName, principalClass, attributes);
        permission.setReadOnly(readonly != null && readonly.equals("true"));

        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();
    }
View Full Code Here

        principalName = transformPrincipalName(principalName, principalClass, attributes);
        permission.setReadOnly(readonly != null && readonly.equals("true"));

        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();
    }
View Full Code Here

            principalClass = "org.jboss.dashboard.security.principals.UserGroupPrincipal";

        principalName = transformPrincipalName(principalName, principalClass, attributes);

        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, Boolean.valueOf(readonly));
        securityPolicy.save();
    }
View Full Code Here

        principalName = transformPrincipalName(principalName, principalClass, attributes);
        permission.setReadOnly(readonly != null && readonly.equals("true"));

        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();
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.security.principals.DefaultPrincipal

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.