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

This widget could not be displayed.
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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

564 views 25 15
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