-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathanonymous-access.vtl
57 lines (51 loc) · 1.78 KB
/
anonymous-access.vtl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#** ===========================================================================
ANONYMOUS ACCESS
This Confluence user macro lists all spaces for which 'Anonymous' has at least
view permission.
Version: 2.0.0
Updated: 2022-01-08
Author/s: George Lewe
Source: https://github.com/glewe/confluence-user-macros
License: GNU LGPLv3
Macro Body Processing: No macro body
*#
#**
PARAMETERS
*#
## @noparams
#** ---------------------------------------------------------------------------
INPUT
*#
#** ---------------------------------------------------------------------------
OUTPUT
*#
<!-- User Macro: Anmonymous Access START -->
<h1>Spaces with Anonymous Access</h1>
<table class="confluenceTable">
<tbody>
<tr>
<th class="confluenceTh">Space Home</th>
<th class="confluenceTh">Space Permissions</th>
</tr>
#foreach ($space in $spaceManager.getAllSpaces())
#set ($anonymousPermission = false)
#foreach ($perm in $space.getPermissions())
#if ($perm.isAnonymousPermission())
#set ($anonymousPermission = true)
#end
#end
#if ($anonymousPermission == true)
<tr>
<td class="confluenceTd"><a href="/display/$space.key">$space.getName() ($space.key)</a></td>
<td class="confluenceTd">
<a class="aui-button aui-button-primary aui-button-compact conf-macro output-block"
style="color:#ffffff;"
href="/spaces/spacepermissions.action?key=$space.key"
target="_blank">Space permissions...</a>
</td>
</tr>
#end
#end
</tbody>
</table>
<!-- User Macro: Anmonymous Access END -->