Confluence Plugin Macro should only be visible to system administators in the Macro Browser

Hi,

I transfered a former user macro to a plugin macro, because I needed additional functionality, which are not possible within just a user macro. As a user macro, I had the option to limit the visibility of the macro to system administrators only in the Macro Browser. How do I achieve this with a plugin macro?

Within the macro definition in my atlassian-plugin.xml, I already tried the following:

  • <category name="admin" /> (macro is in this category, but still visible to every user)
  • <xhtml-macro hidden="true".... (macro is not visible at all, it doesn't even render when using wiki-markup {myMacro}
  • <xhtml-macro showInMacroBrowser="false"... (that is the field name of this setting in the updateusermacro-start.action, no effect)

Any Idea?

1 answer

1 accepted

This widget could not be displayed.

Well, I still don't know how to make a plugin macro only visible to administrators in the macro browser, but I figured out, how to use the attribute hidden="true" in way that works for me.

The setting hidden="true" hides the macro from everyone in the macro browser, the rendering problem, which occured, was due to the fact, that I implemented my plugin only in the xhtml-way:

&lt;xhtml-macro key="mycolour-xhtml"
             name="mycolour" class="com.atlassian.confluence.plugin.xhtml.MyColourMacro" hidden="true"&gt;
    &lt;category name="development"/&gt;
    &lt;parameters/&gt;
&lt;/xhtml-macro&gt;

after adding also the old style macro definitions to my atlassian-plugin.xml:

&lt;macro key="mycolour"
       name="mycolour" class="com.atlassian.confluence.plugin.xhtml.MyColourMacro" hidden="true"&gt;
    &lt;category name="development"/&gt;
    &lt;parameters/&gt;
&lt;/macro&gt;

my macro renders now fine using wiki-markup.

https://developer.atlassian.com/display/CONFDEV/Upgrading+and+Migrating+an+Existing+Confluence+Macro+to+4.0

Unfortunately hidden=true doesn't seem to work (any longer)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

48 views 2 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you