Package org.jasig.portal.security

Examples of org.jasig.portal.security.IUpdatingPermissionManager.removePermissions()


         // merge the permissions
         IPermission[] allPerms = new IPermission[perms1.length + perms2.length];
         System.arraycopy(perms1,0,allPerms,0,perms1.length);
         System.arraycopy(perms2,0,allPerms,perms1.length,perms2.length);

         upm.removePermissions(allPerms);
      }
      catch (Exception e) {
         String errMsg = "DeleteGroup::deletePermissions(): Error removing permissions for " + grpMbr;
         Utility.logMessage("ERROR", errMsg, e);
         throw new Exception(errMsg);
View Full Code Here


                ArrayList phs = (ArrayList)owners.get(owner);
                IPermission[] ipsd = pHolder2DeleteArray(upm, phs);
                if (log.isDebugEnabled())
                    log.debug("removing " + String.valueOf(ipsd.length)
                        + " old permissions");
                upm.removePermissions(ipsd);
                IPermission[] ipsa = pHolder2AddArray(upm, phs);
                if (log.isDebugEnabled())
                    log.debug("adding " + String.valueOf(ipsa.length)
                        + " new permissions");
                upm.addPermissions(ipsa);
View Full Code Here

         // merge the permissions
         IPermission[] allPerms = new IPermission[perms1.length + perms2.length];
         System.arraycopy(perms1,0,allPerms,0,perms1.length);
         System.arraycopy(perms2,0,allPerms,perms1.length,perms2.length);

         upm.removePermissions(allPerms);
      }
      catch (Exception e) {
         String errMsg = "DeleteGroup::deletePermissions(): Error removing permissions for " + grpMbr;
         Utility.logMessage("ERROR", errMsg, e);
         throw new Exception(errMsg);
View Full Code Here

      }

      // If modifying the channel, remove the existing permissions before adding the new ones
      if (!newChannel) {
        IPermission[] oldPermissions = upm.getPermissions(SUBSCRIBER_ACTIVITY, target);
        upm.removePermissions(oldPermissions);
      }
      upm.addPermissions(permissions);

      if (log.isDebugEnabled()) {
          log.debug( "Channel " + definition.getId() + " has been " +
View Full Code Here

      // remove permissions
      AuthorizationService authService = AuthorizationService.instance();
      String target = IPermission.CHANNEL_PREFIX + channelDefinition.getId();
      IUpdatingPermissionManager upm = authService.newUpdatingPermissionManager(FRAMEWORK_OWNER);
      IPermission[] oldPermissions = upm.getPermissions(SUBSCRIBER_ACTIVITY, target);
      upm.removePermissions(oldPermissions);

      // delete the channel
    channelRegistryStore.deleteChannelDefinition(channelDef);

      // Record that a channel has been deleted
View Full Code Here

    }

    // If modifying the channel, remove the existing permissions before adding the new ones
    if (!newChannel) {
      IPermission[] oldPermissions = upm.getPermissions(SUBSCRIBER_ACTIVITY, target);
      upm.removePermissions(oldPermissions);
    }
    upm.addPermissions(permissions);

    if (log.isInfoEnabled())
        log.info( "Channel " + ID + " has been " +
View Full Code Here

            String target = "CHAN_ID." + ci.chanDef.getId();
            IUpdatingPermissionManager upm = authService.newUpdatingPermissionManager(FRAMEWORK_OWNER);

            // Remove old permissions
            IPermission[] oldPermissions = upm.getPermissions(SUBSCRIBER_ACTIVITY, target);
            upm.removePermissions(oldPermissions);

          // 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++) {
View Full Code Here

                ArrayList phs = (ArrayList)owners.get(owner);
                IPermission[] ipsd = pHolder2DeleteArray(upm, phs);
                if (log.isDebugEnabled())
                    log.debug("removing " + String.valueOf(ipsd.length)
                        + " old permissions");
                upm.removePermissions(ipsd);
                IPermission[] ipsa = pHolder2AddArray(upm, phs);
                if (log.isDebugEnabled())
                    log.debug("adding " + String.valueOf(ipsa.length)
                        + " new permissions");
                upm.addPermissions(ipsa);
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.