Is there a way to restrict who can use or add a macro to a page?
Asked by Alex Yasurek:

I built a custom plugin that I would like to only be accessible to a specific group of users in confluence. Everyone should be allow to view the content it outputs when the page is being viewed, but only a specifc group should be allowed to add it to a page.

It would be great if I can just have it not show up in the macro browser or macro autocomplete dropdown if you are not in the allowed group. If thats not possible it would be fine to just throw an error if someone tries to add it to a page and they are not in the right permission group. I assume this would require some check while they are configuring the macro but just not sure how to do that.

Anyone done anything similar to this or know of an easier way to go about this?

Thanks


Answers:
author: Diego
body: Hello there! I believe that what you are looking for is a *++set of permissions for macro usage++* , [@Alex Yasurek](/t5/user/viewprofilepage/user-id/783206).

Currently, this is *++not natively available for Confluence++*. We have a feature request that points directly at this. Here, have a look:
> * **++[\[Confluence Server\] Ability to Restrict Add-ons/Macros to Groups in Confluence](https://jira.atlassian.com/browse/CONFSERVER-39235)++**

Looking through our marketplace I could find a *++third-party plugin that might address++* your needs. The plugin name is *++Macro Security for Confluence++*. You can take a look at it here:
> * ++**[\[Atlassian Marketplace\] Macro Security for Confluence](https://marketplace.atlassian.com/apps/130/macro-security-for-confluence?hosting=datacenter&tab=overview)**++

However, I am not familiar with the ins and outs of the plugin. The description does fit your needs, though.

Let us know if this shed some light on your path, Alex! Looking forward to your reply.

comments: author: Alex Yasurek
body: I did find that same third party macro but the only issue is that it mainly works with other Bob Swift apps. They do give you instructions on how to apply it to custom apps but that would require going through each one, adding code and rebuilding them all. If worse comes to worst that may be our only option but just wondering if anything else was available.

It would be great if Atlassian offered this natively. I voted for that feature request so hopefully it will be considered.

Thanks


author: Diego
body: Hey thanks for keeping the thread alive, [@Alex Yasurek](/t5/user/viewprofilepage/user-id/783206) !

Also, great to have you taking part in this issue and voting the existing feature. Having the input from different customers on requests like this is always good! Currently, I believe that this is our only option on macro restrictions.

If you ever need assistance again, come share with us.


author: Helen Gosper
body: [@Diego](/t5/user/viewprofilepage/user-id/1188952) is there currently a feature request for this functionality in cloud? I would love to vote for it.


author: Diego
body: Hey there [@Helen Gosper](/t5/user/viewprofilepage/user-id/544620) ! We do have a request for this very functionality in Cloud:
> [Ability to Restrict Add-ons/Macros to Groups in Confluence](https://jira.atlassian.com/browse/CONFCLOUD-39235)

Let us hear from you!


Tags: app

confluence-app

confluence-server

permission

restriction

server