Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.PortletPermission

@author David Le Strat

            // SECURITY filtering
            String uniqueName = appName + "::" + portlet.getName();
            if (subject != null)
            {
                if (permissionManager.checkPermission(subject,
                    new PortletPermission(portlet.getUniqueName(),
                    SecuredResource.VIEW_ACTION, subject )))
                {
                    list.add(new PortletInfo(uniqueName, portlet.getDisplayNameText(locale), portlet.getDescriptionText(locale)));
                }
            }
View Full Code Here


            {
                String roleName = (String)roles.next();
                Role userRole = roleManager.getRole(roleName);
                if (userRole != null)
                {
                    Permission permission = new PortletPermission(paName + "::*", "view, edit");
                    if (!permissionManager.permissionExists(permission))
                    {
                        permissionManager.addPermission(permission);
                        permissionManager.grantPermission(userRole.getPrincipal(), permission);
                    }                   
View Full Code Here

            {
                String roleName = (String)roles.next();
                Role userRole = roleManager.getRole(roleName);
                if (userRole != null)
                {
                    Permission permission = new PortletPermission(paName + "::*", "view, edit");
                    if (permissionManager.permissionExists(permission))
                    {
                        permissionManager.removePermission(permission);
                    }                   
                   
View Full Code Here

                // SECURITY filtering
                String uniqueName = appName + "::" + portlet.getName();
                if (subject != null)
                {
                    if (permissionManager.checkPermission(subject,
                        new PortletPermission(portlet.getUniqueName(),
                        SecuredResource.VIEW_ACTION, subject )))
                    {
                        list.add(new PortletInfo(uniqueName, portlet.getDisplayNameText(locale), portlet.getDescriptionText(locale)));
                    }
                }
View Full Code Here

            // SECURITY filtering
            String uniqueName = appName + "::" + portlet.getName();
            if (subject != null)
            {
                if (permissionManager.checkPermission(subject,
                    new PortletPermission(portlet.getUniqueName(),
                    SecuredResource.VIEW_ACTION, subject )))
                {
                    list.add(new PortletInfo(uniqueName, portlet.getDisplayNameText(locale), portlet.getDescriptionText(locale)));
                }
            }
View Full Code Here

        try
        {
            // TODO: it may be better to check the PagePermission for the outer
            // most
            // fragment (i.e. the PSML page)
            AccessController.checkPermission(new PortletPermission(resource, action));
        }
        catch (AccessControlException e)
        {
            return false;
        }
View Full Code Here

        try
        {
            // TODO: it may be better to check the PagePermission for the outer
            // most
            // fragment (i.e. the PSML page)
            AccessController.checkPermission(new PortletPermission(resource, action));
        }
        catch (AccessControlException e)
        {
            return false;
        }
View Full Code Here

TOP

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

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.