Forums

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

Is it possible to restrict or hide users and project roles?

Pavel Rusakov
Contributor
February 27, 2025

Hi!
I have a case then I want to add 3 access groups(view,edit,admin) to project. I don't want the administrators adding any people or groups.  Is it possible to restrict or hide users and project roles? Maybe need I use Scriptrunner? Is anybody resolved this case?

 

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2025

Hi @Pavel Rusakov 

Don't use project role in your permission scheme.

Base you permission scheme for the project on groups and or users, best practice use groups.

This will stop having people in roles to be able to grant permissions on a project

You will have to create the groups in Jira.

Pavel Rusakov
Contributor
February 27, 2025

Yes! I do it. But, The Project Administrators can add someone with button "Add users to a role". I want to restrict or hide it. 

Or do you mean the  "
/permissions" ? Add groups directly to /permissions and remove mapping with roles?

Do you know how I can hide it? Maybe scriprunner Fragments?

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2025

Hi @Pavel Rusakov 

Yes remove the role mapping the permission schemes.

The will make the "add user to a role" button useless, as no roles will be specified to permissions in the permission scheme

Pavel Rusakov
Contributor
March 11, 2025

I have been found the solution with SR Fragments. I use "Hide system or plugin UI element" :

com.atlassian.jira.jira-project-config-plugin:view_project_roles 

with condition: 

import com.atlassian.jira.component.ComponentAccessor

def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser

def groupManager = ComponentAccessor.groupManager

if (!groupManager.isUserInGroup(user, "jira-administrators")) {

return false

}

return true

 

Like Marc - Devoteam likes this
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2025

HI @Pavel Rusakov 

Nice.

But I think to solution I provided can be used without a 3rd party app.

Yours is also nice, but it requires users to have script runner installed.

Like Pavel Rusakov likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.16
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events