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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.