Answer
You can use a combination of the Visibility Plugin with the Style macro to show the button only to space administrators.
To hide the Edit button:
To hide Edit Contents button:
Since we introduced the in-page editor, the ID of Edit Contents button has been changed from editScaffoldLink
to edit-scaffold-link
.
You may also enable the HTML Macro, however, be aware that Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks.