1 Date: Mon, 29 Jun 2015 12:04:28 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.5.4)
3 Content-Type: application/x-phpwiki;
4 pagename=Help%2FPagePermissions;
5 flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
7 Content-Transfer-Encoding: binary
9 == Full recursive ACL page permissions support (Solaris / Windows style) ==
11 Boolean permissions per page and action (**granted** or **denied**) based on the current users
12 group membership is implemented with ACL's (Access Control Lists).
13 Opposed to the simplier unix like ugo:rwx system. \\
14 The previous system was only based on action and current user, independent of pages.
16 A individual page permission may be inherited from its parent pages, and
17 from an optional master page ("." or _dotpage'). \\
18 Use predefined default permissions, if a "." page does not exist. \\
19 Pagenames starting with "." have tighter default permissions. (edit, change, list disallowed)
21 === Order of Evaluation (denial overrides granted, or vice versa?) ==
23 The array of permissions is evaluated from top to bottom. \\
24 Access is granted if the next matching **group membership** returns true, denied if false. \\
25 If the group membership is false, the next group is tried. \\
26 If no group membership matches the upper permissions are tried recursively: \\
27 current page => basepage => "." page => default perms. \\
28 If no group-perm pair grants access, access is denied.
30 Consider the following perm:
32 'change' => array(ACL_ADMIN => false,
35 => "Members of ADMIN may not change, the owner may change."
39 For Authentication see ~WikiUser.php, ~WikiGroup.php and main.php
41 I suspect ACL page permissions to degrade performance by 10%
43 Enable/Disable it in config/config.ini:
45 ENABLE_PAGEPERM = true
47 The defined (and extendable) main.php actions map to simplier access types:
51 create => edit or create
55 list in PageList => list
58 For simplicity we also map the ACL to the posix-style _owner_, _group_ and _world_ groups
59 and _read_, _write_, _execute_ perms, in cygwin fashion.
61 == Groups - definition of group membership ==
63 See ~WikiGroup how to enable and where to store user-specific group membership.
64 Group methods: database, file, ldap, wikipage, none
66 To do: _explain better._
68 The following special groups are always predefined, even if no other group methods are provided:
79 Those special groups are stored in a page acl as locale-independent string.
81 **To do**: See the available translations for these special groups.
83 Other group names are safed as defined by the group methods. (e.g. "Other Users")
85 == Perms - mapping of actions to permissions ==
87 ~PhpWiki supports individual actions, the default is browse. To simplify ACL's these
88 actions are mapped to some special permissions (vulgo _'perms'_).
90 We currently support the following permissions which can be stored in every page, for every group.
92 |= list | List this page and all subpages (for PageList)
93 |= view | View this page and all subpages
94 |= edit | Edit this page and all subpages
95 |= create | Create a new (sub)page
96 |= dump | Download the page contents
97 |= change | Change page attributes
98 |= remove | Remove this page
100 There are no plans to support additional custom perms. The API can handle that, but there's no UI,
101 and it would be only specific for certain plugins, which check permissions by their own.
103 === Action <=> Perm mapping ===
105 Those perms are mapped to those actions. [[Help:ActionPage|Action Pages]] (plugins) check their access restrictions by themselves.
107 |= list | //none, 'list' is checked for every pagename listed in PageList, to prevent from being listed in AllPages.//
108 |= view | browse, viewsource, diff, select, xmlrpc, search, pdf
109 |= dump | zip, ziphtml, dumpserial, dumphtml
110 |= edit | revert, edit
111 |= create | //edit or create, if the page doesn't exist yet//
112 |= change | upload, loadfile, remove, lock, unlock, upgrade, chown, setacl, setaclsimple, rename. \\ All other actionpages which are not wikiwords.
114 === Default Permissions ===
117 $perm = array('view' => array(ACL_EVERY => true),
118 'edit' => array(ACL_EVERY => true),
119 'create' => array(ACL_EVERY => true),
120 'list' => array(ACL_EVERY => true),
121 'remove' => array(ACL_ADMIN => true,
123 'change' => array(ACL_ADMIN => true,
126 $perm['dump'] = array(ACL_ADMIN => true,
129 $perm['dump'] = array(ACL_EVERY => true);
131 if (!ALLOW_ANON_USER) {
132 if (!ALLOW_USER_PASSWORDS)
133 $perm['view'] = array(ACL_SIGNED => true);
135 $perm['view'] = array(ACL_AUTHENTICATED => true);
136 $perm['view'][ACL_BOGOUSER] = ALLOW_BOGO_LOGIN ? true : false;
139 if (!ALLOW_ANON_EDIT) {
140 if (!ALLOW_USER_PASSWORDS)
141 $perm['edit'] = array(ACL_SIGNED => true);
143 $perm['edit'] = array(ACL_AUTHENTICATED => true);
144 $perm['edit'][ACL_BOGOUSER] = ALLOW_BOGO_LOGIN ? true : false;
145 $perm['create'] = $perm['edit'];
152 [[PhpWikiDocumentation]]