fragment script for group user.

rmatu001 February 21, 2018

Create a fragment script of type hide, with the idea that some panels for the functional components belonging to a certain group.

The problem is that it is executed for all users and not for the "Reader" group, which are the ones that do not need vision within the panels of the issue.hide.jpg

1 answer

1 vote
Alexey Matveev
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 21, 2018

You should return true or false in your condition. You do not need the if statement. You should replace it with

return var
Rodrigo Matus February 21, 2018

The problem is that it hides the panel for all users and I just want to hide it for the group Gab_restringido.

Lacey McDonnell September 28, 2020

import com.atlassian.jira.component.ComponentAccessor
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def groupManager = ComponentAccessor.getGroupManager()
return !(groupManager.isUserInGroup(currentUser,"Gab_restringido"))

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events