Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.JetspeedPermission


        {
            // classify policy query for local test case; this implementation
            // is not optimized: multiple protection domains exist on the
            // call stack, so this method will be invoked 2-3 times for each
            // access check with the identical principals and permission
            JetspeedPermission j2p = permission instanceof JetspeedPermission ? (JetspeedPermission)permission : null;
            boolean testPermission = j2p != null && (j2p.getType().equals("folder")||j2p.getType().equals("page")||j2p.getType().equals("fragment"));
            Principal[] principals = domain.getPrincipals();
            if ((principals != null) && (principals.length > 0) && (testPermission))
            {
                // check permission using principals if available
                Permissions permissions = new Permissions();
View Full Code Here


            for (String roleName : permissionRoles)
            {
                Role userRole = roleManager.getRole(roleName);
                if (userRole != null)
                {
                    JetspeedPermission permission = permissionManager.newPermission(permissionManager.PORTLET_PERMISSION, paName + "::*", "view, edit");
                    if (!permissionManager.permissionExists(permission))
                    {
                        permissionManager.addPermission(permission);
                        permissionManager.grantPermission(permission, userRole);
                    }                   
View Full Code Here

            for (String roleName : permissionRoles)
            {
                Role userRole = roleManager.getRole(roleName);
                if (userRole != null)
                {
                    JetspeedPermission permission = permissionManager.newPermission(permissionManager.PORTLET_PERMISSION, paName + "::*", "view, edit");
                    if (permissionManager.permissionExists(permission))
                    {
                        permissionManager.removePermission(permission);
                    }                   
                   
View Full Code Here

            throw new SerializerException(SerializerException.GET_EXISTING_OBJECTS.create(new String[] { "Permissions",
                    e.getMessage() }));
        }
        for (JSPermission jsPermission : permissionList)
        {
            JetspeedPermission perm = null;
            if (jsPermission.getType().equals(JSPermission.TYPE_PORTAL))
            {
                perm = pm.newPermission(PermissionFactory.PORTLET_PERMISSION, jsPermission.getResource(), jsPermission.getActions());
            }
            else
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.JetspeedPermission

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.