Examples of newPrincipal()


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

        // 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
        Enumeration fragments = sequence.elements();
View Full Code Here

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

    AuthorizationService authService = AuthorizationService.instance();
    String target = "CHAN_ID." + ID;
    IUpdatingPermissionManager upm = authService.newUpdatingPermissionManager(FRAMEWORK_OWNER);
    IPermission[] permissions = new IPermission[groupMembers.length];
    for (int i = 0; i < groupMembers.length; i++) {
      IAuthorizationPrincipal authPrincipal = authService.newPrincipal(groupMembers[i]);
      permissions[i] = upm.newPermission(authPrincipal);
      permissions[i].setType(GRANT_PERMISSION_TYPE);
      permissions[i].setActivity(SUBSCRIBER_ACTIVITY);
      permissions[i].setTarget(target);
    }
View Full Code Here

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

        this.ssTitle = "friendly";
        try {
            AuthorizationService authService = AuthorizationService.instance();
            EntityIdentifier ei = this.portcs.getUserPreferencesManager()
                    .getPerson().getEntityIdentifier();
            IAuthorizationPrincipal ap = authService.newPrincipal(ei.getKey(),
                    ei.getType());
            if (ap.hasPermission("UP_ERROR_CHAN", "VIEW", "DETAILS"))
                this.ssTitle = "detailed";
        } catch (Throwable t) {
            log.error("Exception checking whether user authorized to view " +
View Full Code Here

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

        // 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
        Enumeration fragments = sequence.elements();
View Full Code Here

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

          // Add new permissions for this channel based on both groups and users
          if (ci.groups != null) {
            IPermission[] newGroupPermissions = new IPermission[ci.groups.length];
            for (int j = 0; j < ci.groups.length; j++) {
                IAuthorizationPrincipal authPrincipal = authService.newPrincipal(ci.groups[j]);
                newGroupPermissions[j] = upm.newPermission(authPrincipal);
                newGroupPermissions[j].setType(GRANT_PERMISSION_TYPE);
                newGroupPermissions[j].setActivity(SUBSCRIBER_ACTIVITY);
                newGroupPermissions[j].setTarget(target);
            }
View Full Code Here

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

            upm.addPermissions(newGroupPermissions);
    }
          if (ci.users != null) {
              IPermission[] newUserPermissions = new IPermission[ci.users.length];
              for (int j=0; j < ci.users.length; j++) {
                    IAuthorizationPrincipal authPrincipal = authService.newPrincipal(ci.users[j]);
                    newUserPermissions[j] = upm.newPermission(authPrincipal);
                    newUserPermissions[j].setType(GRANT_PERMISSION_TYPE);
                    newUserPermissions[j].setActivity(SUBSCRIBER_ACTIVITY);
                    newUserPermissions[j].setTarget(target);
              }
View Full Code Here

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

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

                    // 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

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

            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

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

        // 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
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.