Package org.apache.jetspeed.services.security

Examples of org.apache.jetspeed.services.security.PortalResource


        {
            PortletEntry entry =  (PortletEntry) pItr.next();
            if (hideEmpties)
            {
                if (JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(),
                                         new PortalResource(entry),
                                         JetspeedSecurity.PERMISSION_VIEW)
                    && ((!entry.isHidden())
                    && (!entry.getType().equals(PortletEntry.TYPE_ABSTRACT))
                    && entry.hasMediaType(mediaType)))
                {
View Full Code Here


        assertNotNull( "Have userParameter", userParam);
        userParam.setName("UserParam");
        userParam.setValue("userValue");
        userParam.setSecurity(userSecurity);
        userPortletEntry.addParameter(userParam);
        assertEquals( "Admin user customize access to admin parameter", true, JetspeedPortalAccessController.checkPermission( adminUser, new PortalResource( userPortletEntry, adminParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
        assertEquals( "Turbine user customize access to admin parameter", false, JetspeedPortalAccessController.checkPermission( turbineUser, new PortalResource( userPortletEntry, adminParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
        assertEquals( "Admin user customize access to admin parameter", true, JetspeedPortalAccessController.checkPermission( adminUser, new PortalResource( userPortletEntry, userParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
        assertEquals( "Turbine user customize access to admin parameter", true, JetspeedPortalAccessController.checkPermission( turbineUser, new PortalResource( userPortletEntry, userParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
       
/*
        RegistryEntry adminEntry = createRegistryEntry( ADMIN_PORTLET, "ST_01.admin");
        RegistryEntry userEntry = createRegistryEntry( USER_PORTLET, "ST_01.user");
        RegistryEntry allEntry = createRegistryEntry( ALL_PORTLET, "ST_01.all");
View Full Code Here

            // Retrieve registry entry
            PortletEntry entry = (PortletEntry) Registry.getEntry(Registry.PORTLET, portletName);

            // Verify security for the parameter
            boolean canAccess = JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(),
                                                                 new PortalResource(entry),
                                                                 JetspeedSecurity.PERMISSION_CUSTOMIZE);

            if (canAccess)
            {
                // Always set portlet id to "preview" so each preview request gets it from the cache.
View Full Code Here

                PortletEntry entry = (PortletEntry) Registry.getEntry(Registry.PORTLET, portlet.getName());
                Parameter param = entry.getParameter(parmName);

                // Verify security for the parameter
                boolean canAccess = JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(),
                                                                     new PortalResource(entry, param),
                                                                     JetspeedSecurity.PERMISSION_CUSTOMIZE);
                Map portletParms = portlet.getPortletConfig().getInitParameters();
                String parmStyle = portlet.getPortletConfig().getInitParameter(parmName + ".style");

                // Add portlet reference
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.services.security.PortalResource

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.