@@ -117,6 +117,14 @@ def add_policies(self, rules):
117117 """
118118 return self .add_named_policies ("p" , rules )
119119
120+ def add_policies_Ex (self , rules ):
121+ """add_policies_Ex adds authorization rules to the current policy.
122+
123+ If the rule already exists, the rule will not be added.
124+ But unlike add_policies, other non-existent rules are added instead of returning false directly.
125+ """
126+ return self .add_named_policies_Ex ("p" , rules )
127+
120128 def add_named_policy (self , ptype , * params ):
121129 """adds an authorization rule to the current named policy.
122130
@@ -139,6 +147,14 @@ def add_named_policies(self, ptype, rules):
139147 Otherwise the function returns true for the corresponding by adding the new rule."""
140148 return self ._add_policies ("p" , ptype , rules )
141149
150+ def add_named_policies_Ex (self , ptype , rules ):
151+ """add_named_policies_Ex adds authorization rules to the current policy.
152+
153+ If the rule already exists, the rule will not be added.
154+ But unlike add_named_policies, other non-existent rules are added instead of returning false directly.
155+ """
156+ return self ._add_policies_Ex ("p" , ptype , rules )
157+
142158 def update_policy (self , old_rule , new_rule ):
143159 """updates an authorization rule from the current policy."""
144160 return self .update_named_policy ("p" , old_rule , new_rule )
0 commit comments