Skip to content

Commit c9e7f61

Browse files
committed
adding check for Control grant for any operation on .acl files
1 parent 0988e33 commit c9e7f61

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/WAC.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ public function getRequestedGrants($request) {
179179
$path = str_replace($this->basePath, '', $path);
180180
}
181181

182+
// Special case: restrict access to all .acl files.
183+
// Control is needed to do anything with them,
184+
// having Control allows all operations.
185+
if (preg_match('/.acl$/', $path)) {
186+
return array(
187+
"resource" => array('http://www.w3.org/ns/auth/acl#Control')
188+
);
189+
}
190+
182191
switch ($method) {
183192
case "GET":
184193
case "HEAD":

0 commit comments

Comments
 (0)