-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add methods for resetSharing + verifySharing to aclService, also incl…
…… (#410) * add methods for resetSharing + verifySharing to aclService, also includes tests. * minor fix, remove clear on userAccesses * minor fix
- Loading branch information
Showing
4 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,13 @@ | |
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
import org.hisp.dhis.common.BaseIdentifiableObject; | ||
import org.hisp.dhis.common.IdentifiableObject; | ||
import org.hisp.dhis.feedback.ErrorReport; | ||
import org.hisp.dhis.user.User; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Morten Olav Hansen <[email protected]> | ||
*/ | ||
|
@@ -219,4 +223,21 @@ public interface AclService | |
* @return Populated access instance | ||
*/ | ||
<T extends IdentifiableObject> Access getAccess( T object, User user ); | ||
|
||
/** | ||
* Sets default sharing props on object, disregarding what is already there. | ||
* | ||
* @param object Object to update | ||
* @param user User to base ACL on | ||
*/ | ||
<T extends BaseIdentifiableObject> void resetSharing( T object, User user ); | ||
|
||
/** | ||
* Verify that sharing props are correctly set according to user. | ||
* | ||
* @param object Object to update | ||
* @param user User to base ACL on | ||
* @return List of error reports (if any) | ||
*/ | ||
<T extends IdentifiableObject> List<ErrorReport> verifySharing( T object, User user ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters