Definition at line 11 of file SimplePluginTest.php.
◆ testCheckPrivileges()
Sabre\DAVACL\SimplePluginTest::testCheckPrivileges |
( |
| ) |
|
Definition at line 280 of file SimplePluginTest.php.
References $aclPlugin, $auth, $server, $tree, and Sabre\DAVACL\Plugin\R_PARENT.
284 'principal' =>
'principals/admin',
285 'privilege' =>
'{DAV:}read',
288 'principal' =>
'principals/user1',
289 'privilege' =>
'{DAV:}read',
292 'principal' =>
'principals/admin',
293 'privilege' =>
'{DAV:}write',
299 new MockACLNode(
'foo', $acl),
301 new DAV\SimpleCollection(
'principals', [
302 new MockPrincipal(
'admin',
'principals/admin'),
309 $aclPlugin->allowUnauthenticatedAccess =
false;
312 $auth =
new DAV\Auth\Plugin(
new DAV\Auth\Backend\Mock());
const R_PARENT
Recursion constants.
◆ testCurrentUserPrincipalsGroups()
Sabre\DAVACL\SimplePluginTest::testCurrentUserPrincipalsGroups |
( |
| ) |
|
Definition at line 162 of file SimplePluginTest.php.
References $auth, $server, and $tree.
166 new DAV\SimpleCollection(
'principals', [
167 new MockPrincipal(
'admin',
'principals/admin', [
'principals/administrators',
'principals/everyone']),
168 new MockPrincipal(
'administrators',
'principals/administrators', [
'principals/groups'], [
'principals/admin']),
169 new MockPrincipal(
'everyone',
'principals/everyone', [], [
'principals/admin']),
170 new MockPrincipal(
'groups',
'principals/groups', [], [
'principals/administrators']),
176 $acl->allowUnauthenticatedAccess =
false;
180 $auth =
new DAV\Auth\Plugin(
new DAV\Auth\Backend\Mock());
184 $auth->beforeMethod(
new HTTP\Request(),
new HTTP\Response());
188 'principals/administrators',
189 'principals/everyone',
193 $this->assertEquals($expected, $acl->getCurrentUserPrincipals());
196 $this->assertEquals($expected, $acl->getCurrentUserPrincipals());
◆ testCurrentUserPrincipalsNotLoggedIn()
Sabre\DAVACL\SimplePluginTest::testCurrentUserPrincipalsNotLoggedIn |
( |
| ) |
|
Definition at line 126 of file SimplePluginTest.php.
References $server.
129 $acl->allowUnauthenticatedAccess =
false;
133 $this->assertEquals([], $acl->getCurrentUserPrincipals());
◆ testCurrentUserPrincipalsSimple()
Sabre\DAVACL\SimplePluginTest::testCurrentUserPrincipalsSimple |
( |
| ) |
|
Definition at line 137 of file SimplePluginTest.php.
References $auth, $server, and $tree.
141 new DAV\SimpleCollection(
'principals', [
142 new MockPrincipal(
'admin',
'principals/admin'),
148 $acl->allowUnauthenticatedAccess =
false;
152 $auth =
new DAV\Auth\Plugin(
new DAV\Auth\Backend\Mock());
156 $auth->beforeMethod(
new HTTP\Request(),
new HTTP\Response());
158 $this->assertEquals([
'principals/admin'], $acl->getCurrentUserPrincipals());
◆ testGetACL()
Sabre\DAVACL\SimplePluginTest::testGetACL |
( |
| ) |
|
Definition at line 200 of file SimplePluginTest.php.
References $aclPlugin, $server, and $tree.
204 'principal' =>
'principals/admin',
205 'privilege' =>
'{DAV:}read',
208 'principal' =>
'principals/admin',
209 'privilege' =>
'{DAV:}write',
215 new MockACLNode(
'foo', $acl),
220 $aclPlugin->allowUnauthenticatedAccess =
false;
223 $this->assertEquals($acl,
$aclPlugin->getACL(
'foo'));
◆ testGetCurrentUserPrivilegeSet()
Sabre\DAVACL\SimplePluginTest::testGetCurrentUserPrivilegeSet |
( |
| ) |
|
Definition at line 227 of file SimplePluginTest.php.
References $aclPlugin, $auth, $server, and $tree.
231 'principal' =>
'principals/admin',
232 'privilege' =>
'{DAV:}read',
235 'principal' =>
'principals/user1',
236 'privilege' =>
'{DAV:}read',
239 'principal' =>
'principals/admin',
240 'privilege' =>
'{DAV:}write',
246 new MockACLNode(
'foo', $acl),
248 new DAV\SimpleCollection(
'principals', [
249 new MockPrincipal(
'admin',
'principals/admin'),
256 $aclPlugin->allowUnauthenticatedAccess =
false;
259 $auth =
new DAV\Auth\Plugin(
new DAV\Auth\Backend\Mock());
263 $auth->beforeMethod(
new HTTP\Request(),
new HTTP\Response());
267 '{DAV:}write-properties',
268 '{DAV:}write-content',
273 '{DAV:}read-current-user-privilege-set',
276 $this->assertEquals($expected,
$aclPlugin->getCurrentUserPrivilegeSet(
'foo'));
◆ testGetFlatPrivilegeSet()
Sabre\DAVACL\SimplePluginTest::testGetFlatPrivilegeSet |
( |
| ) |
|
Definition at line 40 of file SimplePluginTest.php.
References $server.
44 'privilege' =>
'{DAV:}all',
50 'concrete' =>
'{DAV:}all',
53 'privilege' =>
'{DAV:}read',
57 '{DAV:}read-current-user-privilege-set',
59 'concrete' =>
'{DAV:}read',
62 'privilege' =>
'{DAV:}read-acl',
65 'concrete' =>
'{DAV:}read-acl',
67 '{DAV:}read-current-user-privilege-set' => [
68 'privilege' =>
'{DAV:}read-current-user-privilege-set',
71 'concrete' =>
'{DAV:}read-current-user-privilege-set',
74 'privilege' =>
'{DAV:}write',
77 '{DAV:}write-properties',
78 '{DAV:}write-content',
83 'concrete' =>
'{DAV:}write',
85 '{DAV:}write-properties' => [
86 'privilege' =>
'{DAV:}write-properties',
89 'concrete' =>
'{DAV:}write-properties',
91 '{DAV:}write-content' => [
92 'privilege' =>
'{DAV:}write-content',
95 'concrete' =>
'{DAV:}write-content',
98 'privilege' =>
'{DAV:}unlock',
101 'concrete' =>
'{DAV:}unlock',
104 'privilege' =>
'{DAV:}bind',
107 'concrete' =>
'{DAV:}bind',
110 'privilege' =>
'{DAV:}unbind',
113 'concrete' =>
'{DAV:}unbind',
118 $plugin =
new Plugin();
119 $plugin->allowUnauthenticatedAccess =
false;
122 $this->assertEquals($expected, $plugin->getFlatPrivilegeSet(
''));
◆ testValues()
Sabre\DAVACL\SimplePluginTest::testValues |
( |
| ) |
|
Definition at line 13 of file SimplePluginTest.php.
References $aclPlugin.
16 $this->assertEquals(
'acl',
$aclPlugin->getPluginName());
18 [
'access-control',
'calendarserver-principal-property-search'],
24 '{DAV:}expand-property',
25 '{DAV:}principal-match',
26 '{DAV:}principal-property-search',
27 '{DAV:}principal-search-property-set' 31 $this->assertEquals([
'ACL'],
$aclPlugin->getMethods(
''));
The documentation for this class was generated from the following file: