Package org.dspace.authorize

Examples of org.dspace.authorize.ResourcePolicy.update()


            if (policyId == -1)
            {
                // create new policy
                policy = ResourcePolicy.create(c);
                policy.setResource(community);
                policy.update();
            }
            else
            {
                policy = ResourcePolicy.find(c, policyId);
            }
View Full Code Here


                    request, "collection_id"));

            AuthorizeUtil.authorizeManageCollectionPolicy(c, collection);
            ResourcePolicy policy = ResourcePolicy.create(c);
            policy.setResource(collection);
            policy.update();

            Group[] groups = Group.findAll(c, Group.NAME);
            EPerson[] epeople = EPerson.findAll(c, EPerson.EMAIL);

            // return to collection permission page
View Full Code Here

                    request, "community_id"));

            AuthorizeUtil.authorizeManageCommunityPolicy(c, community);
            ResourcePolicy policy = ResourcePolicy.create(c);
            policy.setResource(community);
            policy.update();

            Group[] groups = Group.findAll(c, Group.NAME);
            EPerson[] epeople = EPerson.findAll(c, EPerson.EMAIL);

            // return to collection permission page
View Full Code Here

                collection = Collection.find(c, collectionId);

                // modify the policy
                policy.setAction(actionId);
                policy.setGroup(group);
                policy.update();

                // if it is a read, policy, modify the logo policy to match
                if (actionId == Constants.READ)
                {
                    // first get a list of READ policies from collection
View Full Code Here

                community = Community.find(c, communityId);

                // modify the policy
                policy.setAction(actionId);
                policy.setGroup(group);
                policy.update();

                // if it is a read, policy, modify the logo policy to match
                if (actionId == Constants.READ)
                {
                    // first get a list of READ policies from collection
View Full Code Here

                item = Item.find(c, itemId);

                // modify the policy
                policy.setAction(actionId);
                policy.setGroup(group);
                policy.update();

                // show edit form!
                prepItemEditForm(c, request, item);

                displayPage = "/dspace-admin/authorize-item-edit.jsp";
View Full Code Here

              AuthorizeManager.removeAllPolicies(context, bs)// remove the default policy
              ResourcePolicy rp = ResourcePolicy.create(context);
              rp.setResource(bs);
              rp.setAction(ce.permissionsActionId);
              rp.setGroup(group);   
              rp.update();
        }
          }
         
          //update after all changes are applied
          bs.update();
View Full Code Here

            rp.setResource(bs);
            rp.setAction(actionID);
            rp.setGroup(g);

            rp.update();
        }
        else
        {
            if (actionID == Constants.READ)
            {
View Full Code Here

          AuthorizeManager.removeAllPolicies(context, logo);
          AuthorizeManager.addPolicies(context, policySet, logo);
      }
     
      // Perform the update action
      policy.update();
      context.commit();
     
      result.setContinue(true);
      result.setOutcome(true);
      if (added)
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.