| Name | Page Access Macro |
|---|---|
| Vendor | The Children's Hospital of Philadelphia (Website) |
| Authors | Kristyn Oliveti |
| Homepage | http://confluence.atlassian.com/display/CONFEXT/Page+Access+Macros |
| Issue Management | http://developer.atlassian.com/jira/browse/CPAM |
| Categories | Macros |
| Version | 1.1 |
| Availability | Confluence v2.5.8 to v2.7.3 |
| State | Stable |
| License | Freeware / Open Source (BSD) |
| Price | Free |
| Release Docs | http://confluence.atlassian.com/display/CONFEXT/Page+Access+Macros |
| Java API Docs | n/a |
| Download Source | http://svn.atlassian.com/svn/public/contrib/confluence/confluence-page-access-macros/trunk/ |
| Download JAR | page-access-1.1.jar |
Description/Features
The Page Access Macros plugin contains two macros which allow you to display a list of users who have view access to the page or space in which the macros are included. Both macros can optionally take one parameter - the maximum number of users the list should display. If the number of users with view access is beyond the limit set in the parameter, a message indicating this is displayed.
Inspiration for this plugin was taken from the Space Access Macro created by Near Infinity Corporation for Confluence v1.4 to v2.2. This plugin applies the concept to both the page and space levels, and adds additional functionality.
License
This plugin is released under a BSD license. You can read a copy of the license here.
Installation
| You need to have System Administrator permissions in order to install and configure plugins. |
Installing and Configuring Plugins using the Plugin Repository Client
This plugin is listed in the Confluence Plugin Repository. Just find the plugin in the list and click the "install" link.
Installing and Configuration Plugins Manually
If you do not wish to use the Confluence Plugin Repository, you can still install this plugin by uploading it to Confluence.
- Download the plugin JAR file above.
- In the 'Administration' section of Confluence, click the Plugins link.
- Next to the input box at the top of the page, click the 'Browse' button to find the plugin JAR you wish to install on your hard drive.
- Select the jar file and click 'Open', the location of the JAR file should fill in the input box.
- Click the 'Upload' button.
- The plugin will be uploaded from your machine to Confluence, and will be automatically installed.
Usage
Page Access Macro
To insert the Page Access Macro into a page, type the following:
{page-access}
If you wish to specify a maximum number of users the macro should display, add that number as a parameter.
Example:
{page-access:3}
When you view your page, you'll see something that looks like this:

For performance reasons, the maximum numbers of users the macro displays is 100 if no other number is specified. This default can be overridden by specifying a number in the parameter.
Space Access Macro
Usage of the Space Access Macro is identical to that of the Page Access Macro. To insert the Space Access Macro into a page, type the following:
{space-access}
If you wish to specify a maximum number of users, add that number as a parameter.
Example:
{space-access:3}
When you view your page, you'll see something that looks like this:

For performance reasons, the maximum numbers of users the macro displays is 100 if no other number is specified. This default can be overridden by specifying a number in the parameter.
Custom Usage
| The below instructions are only meant for plugin developers or Confluence administrators who can build a plugin from source, have access to the Confluence server, and know how to edit Velocity templates. These instructions assume you have Maven 2 and the Atlassian Maven PDK installed according to the instructions on this page. |
At our organization, we wanted the {page-access} macro to be on every page, so we added it to the page "Info" tab. For others who might wish to do this, here are instructions.
- Download the plugin source code from the link above
- In the trunk\src\main\resources\templates\extra directory you will see three files (pageaccessmacro.vm, _pageaccessmacro.vm, and help.vm)
- Remove pageaccessmacro.vm and remove the underscore from _pageaccessmacro.vm so that it becomes the new pageaccessmacro.vm
- Using Command Prompt or Terminal, navigate to the trunk directory and run mvn install to rebuild the plugin JAR
- You will find the new JAR file in the trunk\target directory. Upload it to Confluence using the 'Installing and Configuring Plugins Manually' instructions above.
- In your Confluence installation, navigate to confluence\pages and open pageinfo.vm (Note: On Confluence 2.7 and above, this file is called viewinfo.vm).
- Find where you wish the macro to be displayed, add the code below, and save the file:
<div class="basicPanelContainer" style="width: 100%"> $action.getGlobalHelper().renderConfluenceMacro("{page-access}") </div>
After completing this, you will see something like this upon viewing the "Info" tab of any page:

Version History
| Version | Date | State | License | Price |
|
|
05 May 2008 | Stable | Freeware / Open Source (BSD) | Free |
Open Issues
|
|
||||
|---|---|---|---|---|
| T | Key | Summary | Reporter | Status |
|
|
CPAM-1 | When using LDAP, macros render as NullPointerException in Confluence 2.8.0 | Gavin McKenzie |
|
Screenshots
|
Screenshots (view as slideshow) |
||||||
|---|---|---|---|---|---|---|
|
|
|
|
||||
| The Page Access Macro configured to display the first three users | The Space Access Macro configured to display the first three users | The Page Access Macro as a component of a page "Info" tab | ||||

Comments (1)
Jul 02
Leon Collins says:
coming soon..coming soon..