{secure-include}
Plugin: Perimeter Plugin
This macro makes it possible to include a page from another space which may be inaccessible to all viewers of the current space.
Description
It does not allow arbitrary including of pages from other spaces. The only users who can include a page from a secure space are those who already have view access into the other space. If that user's access is later revoked, the include ceases to function.
So, when is this useful? The main case I have come across is when there is a page inside a secured space which is of interest to a wider audience. It may be argued that the page should be moved elsewhere, but in some cases this isn't practical, or even possible. Alternately, the content could be copy-n-pasted into a page in a more 'open' space. however, then it will become out-of-date over time.
Usage
Parameters
| Name |
Required |
Default |
Description |
| id | | | The id which is unique to the current page. This allows multiple includes on a single page. It does not have to be related to the page being included. |
Examples
In this example, consider the following setup:
| Space |
SECURE |
| Viewers |
bob, george |
| Editors |
bob |
| Space |
OPEN |
| Viewers |
george, mary |
| Editors |
george, mary |
In the SECURE space we have two pages, 'Interesting' and 'Secret'.
George decides that the 'Interesting' page in the SECURE space would be useful to Mary, but the rest of the SECURE space isn't really relevant and in fact shouldn't be visible. So, he has two options:
- Copy-n-paste the content of 'SECURE:Interesting' into a page in the OPEN space, or
- Use the {secure-include} macro to allow viewers of the OPEN space to see the current contents of the 'SECURE:Interesting' page.
Since this is an example for {secure-include}, George decides to go with the latter option. Here's what he did:
- Created a new page in OPEN called 'Interesting Include' (the name can be anything)
- In the contents of this page, he enter the following:
- He then save the page and is presented with something like this:
Unable to render embedded object: File (secureinclude.png) not found.
- He enters "SECURE:Interesting" as the link and hits the 'Include' button.
- The page reloads and assuming he still has view access, the Interesting page is now visible in the OPEN space.
A few things to note
- Mary could not have linked the page in OPEN to 'SECURE:Interesting', since she did not have view access to that page in the first place.
- Mary cannot access any other pages from within the SECURE space - any links will be marked in red, as per usual for such links in Confluence.
- Mary can view and download attachments on 'SECURE:Interesting', but not for any other pages in SECURE.
- Even though Mary has edit access to 'OPEN:Interesting Include' she cannot modify what page is being included, since that is not set in the macro parameters. Once an include has been created for a specific id, it cannot be modified.