Enable/Disable my plugin in some Confluence Spaces

Hi there, Carlos here!
I am trying to make my plugin enable/disable for some spaces in confluence, but I am really lost looking information about that. Its more, I really don’t know if it can be done hehe.

I´m thinking in make a Api call to obtain all spaces (GET /wiki/rest/api/space) in actual confluence cloud instance but then how can I make my pugin only available in some of them? Dont know if there is a property or a module to add this restriction.

Any help is welcome!
Thanks!

1 Like

Have you looked at conditions? Connect conditions

1 Like

hi there @james.dellow , thank you for your quick answer , don’t know why i dindt received an email or notification to know you have answered me.

Whit connect conditions I have to put the spaces directly in the atlassian-connect.json, I am looking how to do the same but selecting the spaces you want to make the plugin disabled, on my plugin configuration menu at the settings side bar of confluence. I mean , to make possible to one confluence admin to make my plugin enable/disable from same spaces.

Best regards, and thanks again for your answer!

@CarlosSnchezPrieto - You create a space-level entity property for your app, and then use the conditions to check against the existence/value of that property. Thus, the condition doesn’t need to hardcode a particular space, but always checks the same property in every space.

Then, somewhere within your app (config screen most likely), you can give a user the ability to disable the plugin for a particular space, which behind the scenes, simply sets the value of that entity property.

1 Like

Thank you very much for your help, I will try as you said. :slight_smile: