|
Summary: |
Add APIs to help extract specific rules from a set of rules based on unique subject , and subject type , and rule state |
Description: |
This task is about implementing new APIs to help extract specific rules from a set of rules based on subject unique subjects , subject type (user/group) , . Basically for each subject found on the original list of rules we will have a Map entry with the subject DocumentReference as key and rule state a Pair of rules ( rule for allowed / rights, rule for denied rights ) as value .
The following APIs will be added :
* getAllowedRuleBySubject Map<DocumentReference, Pair<ReadableSecurityRule, ReadableSecurityRule>> getRulesByUniqueUser ( List<ReadableSecurityRule> rules) : return one allowed rule by unique subject (user/group) * getDeniedRuleBySubject( Extract rules ) : return one denied rule by unique subject (user/group) * getAllowedRuleByUser( from a set of rules ) : return one allowed rule by unique user . * getDeniedRuleByUser Map<DocumentReference, Pair<ReadableSecurityRule, ReadableSecurityRule>> getRulesByUniqueUser ( List<ReadableSecurityRule> rules) : return one denied rule Extract rules by unique user * getAllowedRuleByGroup( from a set of rules ) : return one allowed rule by unique group . * getDeniedRuleByGroup Map<DocumentReference, Pair<ReadableSecurityRule, ReadableSecurityRule>> getRulesByUniqueGroup ( List<ReadableSecurityRule> rules) : return one denied rule Extract rules by unique group from a set of rules. |
|