Attempt to hide the "Create with shared configuration" link in the Create project dialog

Hello All,

My final purpose is to hide the "Create with shared configuration" link in the Create project dialog for non sys admin users.

So I started working with some Javascript in the Jira banner to solve this problem as it seemed appropriate, I managed to figure out how to check whether the current user is in some group with the help of this thread -> https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-get-groups-for-current-login-user-via-Rest-javascript-in/qaq-p/524586

So now the thing is to hide the link. I found out that HTML class of that link is "create-with-shared-config" so I thought that the following code would do the job:

document.getElementsByClassName('create-with-shared-config')[0].style.display = "none";

 But it does not work and it was actually expected. When the page is loaded, the Javascript is executed but no object of class "create-with-shared-config" exist. It is only displayed when the user clicks on the "Create project" link, but at this point the Javascript is not re-executed and the link eventually appears.

So I am kind of stuck now. I was trying to find if an HTML event was thrown when the user clicks on the "Create project" link and trigger a listener at that time that would actually execute the Javascript.

Did any of you run into such issue in the past ? Have you got some hints or idea that would help me achieve my goal ?

Thanks a lot

1 answer

0 votes
Josh Steckler Community Champion Sep 21, 2017

Curious - what problem are you trying to solve by removing this link?

This is the requirement from the operation team. Also, I am interested in the technical challenge.

Josh Steckler Community Champion Sep 21, 2017

You're ok with them creating projects off of the example templates? It's interesting to me because I hear the opposite a lot. Disable the example templates and only allow shared configuration.

Sorry I'm no help finding a cool technical solution :)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,105 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot