Wiki source code of Access Rights

Version 41.1 by Ecaterina Moraru (Valica) on 2017/05/16

Hide last authors
Sorin Burjan 7.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Vincent Massol 36.8 5 = Basic rules =
Vincent Massol 36.7 6
Irina Hrehorciuc 36.2 7 * XWiki provides the ability to set wiki wide rights, granular page level rights and the ability to have programmatic rights, in case you need more control. Thanks to the different levels of control offered by XWiki, it's easy to manage the access to actions like: read, write, comment etc.
8 * You can create groups of users in order to manage the rights of a category of people more easily.
9 * Permissions set at a wiki wide level will be overridden by permissions set at a page level, which have priority.
Denis Gervalle 39.1 10 * When multiple permissions are set at the same wiki/page level, check the priority order of the right in [[permission type>>AdminGuide.Permission types]] to know if access will be allowed or denied.
11 * When a right has been allowed at a given level, it gets implicitly denied to anyone else at the same level. Using this implicit deny behaviour is recommended over applying explicit denial.
Irina Hrehorciuc 36.2 12 * When a permission is explicitly set for a given group or user at a certain scope (page or wiki) then the other groups and users must also have the right explicitly set as well if they need access. For example, when you decide to explicitly allow the view right for "Group A" on a given page, users that are not members of "Group A" must have the view right explicitly set on the given page to be able to view it as well.
Guillaume Lerouge 1.1 13
Irina Hrehorciuc 36.2 14 = Wiki Access Configuration =
Caleb James DeLisle 12.1 15
Irina Hrehorciuc 36.2 16 The first thing you may want to do is configure a **policy access** for your wiki. Depending on what you intend to use your wiki for, you have several options: you can configure your wiki to be public, so that people can edit and comment without necessary being registered or logged in or you can limit the access only to registered users, by configuring a private wiki.
Caleb James DeLisle 12.1 17
Irina Hrehorciuc 36.2 18 == Open Wiki ==
Caleb James DeLisle 12.1 19
Vincent Massol 38.1 20 To have an open wiki where everyone can perform actions like comment or edit, all you have to do is configure the permissions you wish to give to the Guest user, from the Rights administration page, as shown in the following screenshot:
Caleb James DeLisle 12.1 21
Vincent Massol 38.1 22 {{image reference="guest-permissions" width="650px"/}}
23
Irina Hrehorciuc 36.2 24 Letting guests comment on a page creates a more open atmosphere. Often, the most helpful people are unwilling to bother with registration. However comments can be a vector for search engine spam. From a security point of view, you can keep your site open while preventing automated commenting by requiring guests to fill out a captcha before commenting. The captcha will not be displayed or even loaded until they click on the comment window to type their message.
Caleb James DeLisle 12.1 25
Irina Hrehorciuc 36.2 26 {{image reference="CaptchaComment.png"/}}
Manuel Smeria 18.5 27
Irina Hrehorciuc 36.2 28 To find out more please access the [[Captcha configuration]] tutorial.
Caleb James DeLisle 12.1 29
Irina Hrehorciuc 36.2 30 == Public Wiki with Confirmed Registration ==
Caleb James DeLisle 12.1 31
Irina Hrehorciuc 36.2 32 [[Public Wiki with confirmed registration]] means users are required to register with a valid email address. To do this, open the administration interface for the wiki and navigate to the registration section, where you will find several configuration options:
Caleb James DeLisle 12.1 33
Irina Hrehorciuc 36.2 34 * **Use email verification**
35 * **Check Active fields for user authentication**
36 * **Validation e-Mail Content**
Manuel Smeria 18.5 37
Irina Hrehorciuc 36.6 38 You can find more info in the [[Extensions>>extensions:Extension.Mail Application]] page.
Guillaume Delhumeau 20.1 39
Irina Hrehorciuc 36.2 40 == Private Wiki ==
Manuel Smeria 18.5 41
Ecaterina Moraru (Valica) 40.1 42 A Private Wiki means that only specific users can see the wiki content, browse it, edit it etc. Guests will not be able to see the content of the wiki.
Sorin Burjan 7.1 43
Irina Hrehorciuc 36.2 44 To be able to prevent the access of unregistered users, you must check the options **Prevent unregistered users from viewing/editing pages, regardless of the page or space rights** from Administration > Users > Rights
Sorin Burjan 7.1 45
Irina Hrehorciuc 36.2 46 (((
47 {{image reference="RestrictedAccessGuests.png"/}}
48 )))
Jerome 17.1 49
Irina Hrehorciuc 36.2 50 = Main Wiki Access Rights =
Sorin Burjan 7.1 51
Irina Hrehorciuc 36.2 52 To change rights for the main wiki, log in as Administrator, click the {{image reference="DrawerMenuIcon.png"/}} button to open the drawer menu, then click on "Administer Wiki".
Sorin Burjan 7.1 53
Irina Hrehorciuc 36.2 54 {{image reference="AdministerWikiMenu.png"/}}
Manuel Smeria 18.5 55
Irina Hrehorciuc 36.2 56 In the wiki administration page, click on the "Rights" link from the vertical menu to the left.
Sorin Burjan 7.1 57
Irina Hrehorciuc 36.2 58 {{image reference="AdministrationRights.png"/}}
Sorin Burjan 7.1 59
Irina Hrehorciuc 36.2 60 Next, select the users or groups for which you want to set a permission. Note that if you are on the main wiki, you are editing the rights for global users and groups. To know more about the difference between local and global users and groups, follow this link.
Sorin Burjan 7.1 61
Irina Hrehorciuc 36.2 62 {{image reference="GroupRights.png"/}}
Vincent Massol 23.2 63
Irina Hrehorciuc 36.2 64 Click once on a check-box to allow a right, twice to deny it and three times to clear the right and use the default values. Note that rights entries are saved automatically.
Manuel Smeria 18.5 65
Irina Hrehorciuc 36.2 66 = Sub-Wiki Access Rights =
Sorin Burjan 7.1 67
Irina Hrehorciuc 36.2 68 You can consult the specific [[Sub-Wiki access rights]] documentation page to make sure you set correctly the sub-wiki access rights.
Manuel Smeria 18.5 69
Irina Hrehorciuc 36.2 70 = Page Access Rights =
Sorin Burjan 7.1 71
Irina Hrehorciuc 36.2 72 {{info}}
Caleb James DeLisle 12.1 73
Vincent Massol 36.9 74 Starting with XWiki Enterprise 7.2, we have introduced the possibility to create pages inside other pages. This feature is called Nested Pages. Check the [[Content Organization page>>Features.ContentOrganization]] to understand better how it works.
Caleb James DeLisle 12.1 75
Manuel Smeria 18.5 76 {{/info}}
Caleb James DeLisle 12.1 77
Irina Hrehorciuc 36.2 78 == Setting Rights for a Page and Its Children ==
Jerome 17.1 79
Irina Hrehorciuc 36.2 80 If you have a page A and there are several other pages created as children of page A, you can set rights for page A (as parent) and the children pages can inherit the same rights.
Guillaume Delhumeau 20.1 81
Irina Hrehorciuc 36.2 82 To edit the access rights for a page, simply navigate to that page, click the cog button, then on "Administer Page". You will be redirected to a UI ("WebPreferences") with 2 options in the menu on the left under "Users & Groups":
Jerome 17.1 83
Irina Hrehorciuc 36.2 84 (((
85 {{image reference="PageMenuNonTerminal.png"/}}
86 )))
Sorin Burjan 7.1 87
Irina Hrehorciuc 36.2 88 * **Rights: Page & Children** - allows to set the permissions scheme that will apply on the current page and all its children.(((
89 {{image reference="PageAndChildrenRights.png"/}}
90 )))
91 * **Rights: Page** - allows to set the permissions scheme that will apply on the current page only.(((
92 {{image reference="PageRights.png"/}}
93 )))
Manuel Smeria 18.5 94
Irina Hrehorciuc 36.2 95 Click once on a check-box to allow a right, twice to deny it and three times to clear the right and use the default values.
Guillaume Lerouge 2.1 96
Irina Hrehorciuc 36.2 97 == Setting Rights for a Terminal Page ==
Jerome 16.1 98
Irina Hrehorciuc 36.2 99 A terminal page is a wiki page that cannot have children and it is usually created by applications and scripts. Terminal pages don't have a "Preferences" document. This is the reason why, in order to set the access rights for a single page, you will have to click the editing pen icon, then choose "Access rights".
Jerome 16.1 100
Irina Hrehorciuc 36.2 101 (((
102 {{image reference="PageMenuTerminal.png"/}}
103 )))
Jerome 16.1 104
Caleb James DeLisle 12.1 105 = Further Reading =
Manuel Smeria 18.5 106
Ecaterina Moraru (Valica) 41.1 107 * Find our more about [[Permission types]].
108 * The "administration interface" is documented in the [[Administration Application>>extensions:Extension.Administration Application]].
Irina Hrehorciuc 36.2 109 * You can of course get more information about permission management from the code itself.

Get Connected