Summary: Display, in brief format, the permissions settings for pages that have permissions set.
Version: 1.0
Prerequisites:
Status: Mature
Maintainer: Simon
Questions answered by this recipe
How do I display page permissions in a brief tabular format?
Description
Display the permissions settings for pages that have permissions set.
Fields that say "(protected)" mean that you may need to log in (e.g., with an administrative password) in order to view them.
Use the following page list template to create a short list of authorisations.
Implementation
Add the following to your Site.LocalTemplates, or create a page such as Site.AuthListShort?.
#authlistshort
Short authorisation list showing page permissions
>>comment<<
[[#authlistshort]]
(:template defaults passwd=?*:)
(:template first:)
(:table class='authlist' cellspacing=0 cellpadding=0 border=0:)
(:template first {=$Group}:)
(:cellnr colspan=8 style='border-top: gray 1px solid;'
:)[['''{=$Groupspaced}'''/]]:
(:if exists {=$Group}.GroupAttributes:)
[[{=$Group}.GroupAttributes]]
[- [[{=$Group}.GroupAttributes?action=attr | (attr)]] -] :
(:cellnr:)[-''read''-]
(:cell:)[-{{=$Group}.GroupAttributes$PasswdRead}-]
(:cell:)[-''edit''-]
(:cell:)[-{{=$Group}.GroupAttributes$PasswdEdit}-]
(:cell:)[-''attr''-]
(:cell:)[-{{=$Group}.GroupAttributes$PasswdAttr}-]
(:cell:)[-''upload''-]
(:cell:)[-{{=$Group}.GroupAttributes$PasswdUpload}-]
(:ifend:)
(:template each:)
(:if ! equal {=$Name} GroupAttributes :)
(:cellnr colspan=8:)
[[{=$FullName}]]
[- [[{=$FullName}?action=attr | (attr) ]] -] :
(:cellnr:)[-''read''-]
(:cell:)[-{=$PasswdRead}-]
(:cell:)[-''edit''-]
(:cell:)[-{=$PasswdEdit}-]
(:cell:)[-''attr''-]
(:cell:)[-{=$PasswdAttr}-]
(:cell:)[-''upload''-]
(:cell:)[-{=$PasswdUpload}-]
(:ifend:)
(:template last:)
(:cellnr colspan=8 style='border-top: gray 1px solid;' :)
[-{$$PageCount} pages displayed-]
(:tableend:)
[[#authlistshortend]]
>><<
|
(:template defaults passwd=?*:)
(:template first:)
(:template first {=$Group}:)
| {=$Groupspaced}?:
(:template each:)
| |
{=$FullName}?
(attr) :
| | read
| {=$PasswdRead}
| edit
| {=$PasswdEdit}
| attr
| {=$PasswdAttr}
| upload
| {=$PasswdUpload}
(:template last:)
| |
{$$PageCount} pages displayed
|
|
Create the pagelist using the following code
>>font-size:small<<
(:pagelist fmt=#authlistshort request=1 count=20 group=PmWiki,Cookbook:)
>><<
|
|
|
Remove the 'count' and 'group' as required.
Notes
Release notes
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
See also
Contributors
Comments
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.