Package org.jasig.portal.services

Examples of org.jasig.portal.services.AuthorizationService.newPrincipal()


            final String target = PermissionHelper.permissionTargetIdForPortletDefinition(definition);
   
            final IUpdatingPermissionManager upm = authService.newUpdatingPermissionManager(FRAMEWORK_OWNER);
            final List<IPermission> permissions = new ArrayList<IPermission>(groupMembers.size());
            for (final IGroupMember member : groupMembers) {
                final IAuthorizationPrincipal authPrincipal = authService.newPrincipal(member);
                final IPermission permission = upm.newPermission(authPrincipal);
                permission.setType(GRANT_PERMISSION_TYPE);
                permission.setActivity(SUBSCRIBER_ACTIVITY);
                permission.setTarget(target);
                permissions.add(permission);
View Full Code Here


                    // We weren't able to integrate this node into the existing
                    // hierarchy;  we have to dig deeper, until we either (1)
                    // find a match, or (2) reach a root;  type is INHERIT,
                    // unless (by chance) there's something specified in an
                    // entry on grantOrDenyMap.
                    IAuthorizationPrincipal principal = authService.newPrincipal(group);
                    Assignment.Type assignmentType = getAssignmentType(principal, owner, activity, target);
                    parent = new Assignment(principal.getPrincipalString(), bean, assignmentType);
                    parent.addChild(a);
                    placeInHierarchy(parent, hierarchy, owner, activity, target);
                }
View Full Code Here

            entityType = jsonType.getClazz();
        }
       
        // construct an authorization principal for this JsonEntityBean
        AuthorizationService authService = AuthorizationService.instance();
        IAuthorizationPrincipal p = authService.newPrincipal(entity.getId(), entityType);
        return p;
    }

 
  /**
 
View Full Code Here

        // build the auth principal for determining if pushed channels can be
        // used by this user
        EntityIdentifier ei = person.getEntityIdentifier();
        AuthorizationService authS = AuthorizationService.instance();
        IAuthorizationPrincipal ap = authS.newPrincipal(ei.getKey(),
                ei.getType());

        // now merge fragments one at a time into ILF document
       
        for (final Document document : sequence) {
View Full Code Here

        if (user == null) {
            return null;
        }
       
        final AuthorizationService authService = AuthorizationService.instance();
        return authService.newPrincipal(user);
    }

    /**
   * A folder is a column if its parent is a tab element
   *
 
View Full Code Here

            if (IPortletRenderer.CONFIG.equals(portletMode)) {
                final IPerson person = this.personManager.getPerson(httpServletRequest);
               
                final EntityIdentifier ei = person.getEntityIdentifier();
                final AuthorizationService authorizationService = AuthorizationService.instance();
                final IAuthorizationPrincipal ap = authorizationService.newPrincipal(ei.getKey(), ei.getType());
               
                final IPortletEntity portletEntity = portletWindow.getPortletEntity();
                final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
               
                if (!ap.canConfigure(portletDefinition.getPortletDefinitionId().getStringId())) {
View Full Code Here

        if (user == null) {
            return null;
        }
       
        final AuthorizationService authService = AuthorizationService.instance();
        return authService.newPrincipal(user);
    }

}
View Full Code Here

       */
     
        IUserInstance userInstance = userInstanceManager.getUserInstance(request);
        IPerson person = userInstance.getPerson();
        AuthorizationService authService = AuthorizationService.instance();
        IAuthorizationPrincipal principal = authService.newPrincipal(person.getUserName(), IPerson.class);
     
        /**
         * Build a collection of owner IDs for the fragments to which the
         * authenticated user is subscribed
         */
 
View Full Code Here

        final AggregatedGroupMapping group = aggregatedGroupLookupDao.getGroupMapping(everyone.getKey());
        final List<PortletLayoutAggregation> aggregations = portletLayoutDao.getAggregationsForAllPortlets(begin, end, AGGREGATION_INTERVAL, group);
       
        final EntityIdentifier ei = user.getEntityIdentifier();
        final AuthorizationService authService = AuthorizationService.instance();
        final IAuthorizationPrincipal ap = authService.newPrincipal(ei.getKey(), ei.getType());
       
        final Map<String, PortletUsage> resultBuilder = new HashMap<String, PortletUsage>();
       
        for (final PortletLayoutAggregation aggregation : aggregations) {
            final AggregatedPortletMapping portlet = aggregation.getPortletMapping();
View Full Code Here

            entityType = EntityEnum.getEntityEnum(entity.getEntityType()).getClazz();
        }

        // construct an authorization principal for this JsonEntityBean
        AuthorizationService authService = AuthorizationService.instance();
        IAuthorizationPrincipal p = authService.newPrincipal(entity.getId(), entityType);
        return p;
    }

    /**
     * <p>Convenience method that looks up the name of the given group member.
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.