Lines Matching refs:rules
71 // use cached user rules or fetch new ones if not available
76 // apply the rules and use the resulting permission
129 // get all rules that apply to the user and their groups
130 $rules = [];
136 $rules[$pattern] = max($rules[$pattern] ?? AUTH_NONE, $perm);
140 // sort rules by significance
141 $rules = $this->sortRules($rules);
143 return $rules;
147 * Convert the list of rules to a single regular expression
149 * @param array $rules
152 protected function rulesToRegex($rules)
155 foreach ($rules as $rule => $perm) {
257 * Sort the given rules so that the most significant ones come first
259 * @param array $rules
262 protected function sortRules($rules)
264 uksort($rules, function ($a, $b) {
298 return $rules;