Page tree

This macro renders it's content only if current user is in the configured security group

Code is really simple and goes like this

## @param SecurityGroup:title=Security group|type=string|required=true|desc=Security group to check for membership

#if(${action.authenticatedUser} && ${userAccessor.hasMembership(${paramSecurityGroup}, ${action.authenticatedUser.name})})
${body}
#end

Complete macro configuration looks like this


Example usage

The info block with the message "Hello, you are in the group" will be shown only to the users who are in "confluence-administrators" group

  • No labels