-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfluence-users-access.vtl
51 lines (46 loc) · 1.72 KB
/
confluence-users-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
#** ===========================================================================
CONFLUENCE USER ACCESS
This macro lists all spaces for which the group 'confluence-users' has at least
view permission.
Version: 2.0.0
Update: 2021-12-23
Author/s: George Lewe
Source: https://github.com/glewe/confluence-user-macros
License: GNU LGPLv3
Macro Body processing: No macro body
*#
#** ---------------------------------------------------------------------------
PARAMETER
*#
## @noparams
#** ---------------------------------------------------------------------------
OUTPUT
*#
<!-- User Macro: Confluence Users Access START -->
<h1>Spaces with 'confluence-users' Access</h1>
<table class="confluenceTable">
<tbody>
<tr>
<th class="confluenceTh">Space</th>
<th class="confluenceTh">Space Permissions</th>
</tr>
#foreach ($space in $spaceManager.getAllSpaces())
#foreach ($permission in $space.getPermissions())
#if ($permission.isGroupPermission() && $permission.getType() == "VIEWSPACE" && $permission.getGroup() == "confluence-users")
<tr>
<td class="confluenceTd">
<a href="/display/$space.key">$space.getName() ($space.getKey())</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.getKey()"
target="_blank">Space permissions...</a>
</td>
</tr>
#end
#end
#end
</tbody>
</table>
<!-- User Macro: Confluence Users Access END -->