|
Description: |
This task is about implementing new APIs to help : * Extract rules whose subject is a user or a group, the returned rules * {@link #normalizeRulesBySubject are normalized ( List<ReadableSecurityRule> see RIGHTSAPI-20 ) } method. * Extract rules from Organize a set of rules based subject type (user/group) and . Basically for each subject found on the original list of rules we will have a Map entry with the subject DocumentReference as key reference and a Pair of rules ( rule for allowed rights, rule for denied rights state (Allow/Deny ) as value.
The following APIs will be added :
* Map List < DocumentReference, Pair< ReadableSecurityRule , ReadableSecurityRule > > getRulesByUniqueUser getUserRulesNormalized (List<ReadableSecurityRule> rules) : Extract rules by unique whose subject is a user from a set of rules. Returned rules are normalized. * Map List < DocumentReference, Pair< ReadableSecurityRule , ReadableSecurityRule > > getRulesByUniqueUser getGroupRulesNormalized ( List<ReadableSecurityRule> rules) : Extract rules by unique user whose subject is a group from a set of rules. Returned rules are normalized. * Map<DocumentReference, Pair<ReadableSecurityRule, ReadableSecurityRule>> getRulesByUniqueGroup organizeRulesBySubjectAndState ( List<ReadableSecurityRule> rules) : Extract rules by unique group from Organize a set of rules based on subject reference and rule state (Allow/Deny) . |
|