Hi,
I'm looking for a way to hide/show categories based on user access to spaces.
I have found a way to hide categories for users who are not in certain group:
#if ($userAccessor.hasMembership('confluence-administrators', $helper.action.remoteUser.name))
#else
<script type="text/javascript">
AJS.toInit(function(){
AJS.$('#space-labels-list').hide();
AJS.$('.aui-nav-heading').hide();
});
</script>
#endAbove solution was posted here: https://community.atlassian.com/t5/Confluence-questions/Hide-categories-in-Confluence-page/qaq-p/1169745
But do you know how to hide/show categories based on user access to certain space?
Example:
Space name: A,
Category: nameA
Access: only to userA
Space name: B,
Category: nameB
Access: only to userB
And now if I'am userA I want to see only category nameA because I have an access to space A and if I'am userB I want to see only category nameB because I have an access to space B.
Is there a way to do that using Layouts and by modifying above script?
Regards
--
Seweryn