PmWiki /
Passwords
authors
PmWiki has built-in support for password-protecting various areas of the wiki site. Authors generally want to be able to apply passwords to individual pages or to wiki groups. Wiki Administrators can apply passwords to individual pages, to wiki groups, or to the entire site. As with any access control system, the password protection mechanisms described here are only a small part of overall system and wiki security.
As an author editing pages...An author will generally set 3 types of passwords:
?action=attr to the page's URL (address) to access its attributes. Using the form on the attributes page, you can set or clear the read , edit , or attr passwords on the page. In the form you enter the passwords as cleartext; PmWiki encrypts them for you automatically when it stores them.
http://www.example.com/pmwiki.php?n=GroupName.GroupAttributes?action=attr . Then, using the form on the attributes page, you can set or clear the read , edit , or attr passwords for the entire group. In the form you enter the passwords as cleartext; PmWiki encrypts them for you automatically.
Set new read password: alpha beta Set new edit password: beta As an administrator ...You can set passwords on pages and groups exactly as described above for authors. You can also:
Which password wins?In PmWiki, page passwords override group passwords, group passwords override the default passwords, and theadmin password overrides all passwords. This gives a great deal of flexibility in controlling access to wiki pages in PmWiki.
Opening access to pages in protected groups/sitesSometimes we want to "unprotect" pages in a group or site that is otherwise protected. In these cases, the special password "@nopass" is used to indicate that access should be allowed to a page without requiring a password. For example, suppose Main.GroupAttributes has an edit password set, thus restricting the editing of all pages in Main. Now we want Main.WikiSandbox to be editable without a password. Using "clear" for the edit password for Main.WikiSandbox doesn't unprotect the page, because the password is being set by the group. Instead, we set the edit password for Main.WikiSandbox to the special value "@nopass", which tells PmWiki to ignore any site-wide or group-level passwords for that page. << Page history | Documentation Index | Categories >>How can I password protect all the pages and groups on my site? Do I really have to set passwords page by page, or group by group? Administrators can set passwords for the entire site by editing the config.php file; they don't have to set passwords for each page or group. For example, to set the entire site to be editable only by those who know an "edit" password, an administrator can add a line like the following to local/config.php: For more information about the password options that are available only to administrators, see PasswordsAdmin.
How can I create private groups for users, so that each user can edit pages in their group, but no one else (other than the admin) can? Administrators can use the AuthUser recipe and add the following few lines to their local/config.php file to set this up:$group = FmtPageName('$Group', $pagename);This automatically gives edit rights to a group to every user who has the same user name as the group name. |