Use this class to add/edit/delete privileges on groups inside a folder for a subject

Sample call

 SaveResultType saveResultType = new PrivilegeGroupInheritanceSave()
    .assignStem(stem)
    .assignStemScope(Scope.SUB)
    .assignSubject(subject)
    .addPrivilege(AccessPrivilege.ADMIN)
    .addPrivilege(AccessPrivilege.OPTIN)
    .save();
 System.out.println(saveResultType); // INSERT, DELETE, NO_CHANGE, or UPDATE
 


Sample call to delete privileges on groups inside a folder for a subject

 new PrivilegeGroupInheritanceSave()
    .assignStem(stem)
    .assignStemScope(Scope.SUB)
    .assignSubject(subject)
    .assignSaveMode(SaveMode.DELETE)
    .save();


Options

Java docs:  https://software.internet2.edu/grouper/doc/2.5.x/grouper/apidocs/edu/internet2/middleware/grouper/PrivilegeGroupInheritanceSave.html

  • No labels