I want that only a specific role in a specific project can see the link in the top-navigation.bar in jira. how should the condition look like?
this link is for the service-desk-agents in a service desk project. they can quickly open the queues with that. if i leave the condition blank every user can see this link. but i want only this menu-point. only the agents in this service-desk-project should see the link.
Hello,
The codition would look somthing like this
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
import com.atlassian.jira.security.roles.ProjectRole
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def projectRoleManager = ComponentAccessor.getComponentOfType(ProjectRoleManager)
def project = ComponentAccessor.getProjectManager().getProjectByCurrentKey("ProjectKey")
ProjectRole administratorProjectRole = projectRoleManager.getProjectRole("RoleName");
if (projectRoleManager.isUserInProjectRole(user, administratorProjectRole, project)) {
return true
} else {
return false
}
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.