How to make my application show up based on conditions? (spaceKey and/or user role)

I am prototyping an application that adds some custom buttons to the Page actions menu using Confluence content Action:

The button is showing up fine, but now I want to configure it so it only shows up for a specified Confluence space, and also only if a user has a certain role.

I have found some documentation on using display conditions:

But nothing in here suggests that I can use the spaceKey or any user roles as a display condition, unless I am missing something.

So the question is, how could I have my button only show up using either the spaceKey or the users permissions?

The closest thing I have seen using the documentation is maybe using the REST API to set custom entity properties against the space, and maybe even for each user. That seems unintuitive and cumbersome though compared to just directly checking the properties I want.