Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Dont view option Custom Html in menu look and feel

Rodrigo Peixoto
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2019

I need to hide a option "Space Settings" for all users and I do not think the html customization option for power is the code below.

 

<script>
  AJS.toInit(function(){
    if (AJS.params.remoteUser == ''){
      AJS.$("#space-tools-menu-trigger").hide();
    }
  });
</script>

 

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 29, 2019

Hello there! I can see that we need to limit the access of users to the Space Tools. Is that correct?

Hey Rodrigo, if we are talking about Confluence Server we can apply this under Custom HTML section in Confluence General Configuration.

Some words before we apply this:

  1. This change will apply to all of your spaces
  2. Only administrators can change this setting
  3. The space tools will be out of reach

So, let us keep moving!

  1. Click the Cog Icon
  2. Select General Configuration
  3. Search for Custom HTML in the left hand sidebar
  4. Click to edit
  5. In the At beginning of the BODY section, insert the following:
    1. <style type="text/css">
      #space-tools-menu-trigger {
      display:none !important;
      }
      </style>
  6. Click to save

Now, if we do not want to apply this to the whole instance, we can try and modify the Space Layout.

Notes:

  • Save the URL for Space Tools on this Space for the button will not be available if we need to revert
  • This will apply only to the current space
  1. Click Space Tools
  2. Select Look and Feel
  3. Click the Layout tab
  4. Under site layouts, click to create custom on the Main Layout
  5. Search for the section that reads ##HTML BODY BEGINS
  6. Right after that, insert the following
    1. <style type="text/css">
      #space-tools-menu-trigger {
      display:none !important;
      }
      </style>

       7. Click to Save

       8. The space tools should now be hidden

Now for some explanation. The #space-tools-menu-trigger string is actually the ID behind the button. Telling it to display:none will effectively hide it from users.

You can still reach the the space tools, even though the button is hidden. You can follow this path:  Cog Icon > General Configuration > Space Permissions > Manage Permissions. Admittedly this is not ideal, but keep in mind that we are customizing something in Confluence.

 

In Confluence Cloud, however, this is not achievable with this method. We can try and apply this limitation on a page by page basis with third-party addons such as:

HTML Macro for Confluence Cloud

In both platforms (Cloud and Server) setting Permissions correctly should keep users from performing admin only operations within the Space Tools. You can check a little more about permissions here:

Confluence Cloud - Assign Space Permissions

Confluence Cloud - Assign Space Permissions

 

Let us know if this helps you out Rodrigo. Looking out for your reply!

Rodrigo Peixoto
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2019

Hi Diego, thanks for feedback.

 

My problem still happens, I do not see the customization option.

I did step by step that you informed me and did not have that option.

Follow the prints. I use the confluence cloud and not the server.

Can you help-me? Please.

Tks

Captura de Tela 2019-04-29 às 17.19.02.pngCaptura de Tela 2019-04-29 às 17.18.24.pngCaptura de Tela 2019-04-29 às 17.21.00.pngCaptura de Tela 2019-04-29 às 17.20.52.pngCaptura de Tela 2019-04-29 às 17.20.43.png

Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2019

Hello Rodrigo!

Currently, the Custom HTML options are not available for Confluence Cloud. What you could try to use is the HTML Macro for Confluence Cloud, which is a third-party app:

HTML Macro for Confluence Cloud

What you can also do is Limit user access by changing space permissions:

Assign Space Permissions - Confluence Cloud

Let us hear from you Rodrigo!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events