Tabnine Logo
ProjectRoleManager.getProjectRoleActors
Code IndexAdd Tabnine to your IDE (free)

How to use
getProjectRoleActors
method
in
com.atlassian.jira.security.roles.ProjectRoleManager

Best Java code snippets using com.atlassian.jira.security.roles.ProjectRoleManager.getProjectRoleActors (Showing top 6 results out of 315)

origin: com.atlassian.jira/jira-core

  private ProjectRoleActors getProjectRoleActors(String roleId, Project project)
  {
    ProjectRole projectRole = projectRoleManager.getProjectRole(new Long(roleId));
    return projectRoleManager.getProjectRoleActors(projectRole, project);
  }
}
origin: com.atlassian.jira/jira-core

private Collection<ApplicationUser> getUsersByRoles(final Set<Long> roleIds, final Set<Long> projectIds, final Collection<ApplicationUser> existingUsers)
{
  if (CollectionUtils.isEmpty(projectIds) || CollectionUtils.isEmpty(roleIds))
  {
    return existingUsers;
  }
  // only search by roles if projectIds is not empty
  // Note that projectIds list should have been at least populated with the list of browsable projects by the current user
  // create the set to inform following codes that it's not search all
  Collection<ApplicationUser> allUsers = existingUsers == null ? Sets.<ApplicationUser>newHashSet() : existingUsers;
  for (Project project : getProjects(projectIds))
  {
    for (long roleId : roleIds)
    {
      // ok to repeat calls to projectRoleManager, as it has cache
      ProjectRole projectRole = projectRoleManager.getProjectRole(roleId);
      if (projectRole != null)
      {
        allUsers.addAll(projectRoleManager.getProjectRoleActors(projectRole, project).getUsers());
      }
    }
  }
  return allUsers;
}
origin: com.atlassian.jira/jira-core

eventPublisher.publish(new ProjectRoleUpdatedEvent(project, projectRole,  projectRoleManager.getProjectRoleActors(projectRole, project), projectRoleActors));
origin: com.atlassian.jira/jira-core

ProjectRoleActors projectRoleActors = projectRoleManager.getProjectRoleActors(projectRole, project);
List<ApplicationUser> allUsers = new ArrayList<ApplicationUser>();
int rolesRemovedWithMeInIt = 0;
origin: com.atlassian.jira/jira-rest-plugin

sharedUsersBuilder.addAll(activeUsers(projectRoleManager.getProjectRoleActors(projectRole, project).getUsers()));
origin: com.atlassian.jira/jira-core

public ProjectRoleActors getProjectRoleActors(ApplicationUser currentUser, ProjectRole projectRole, Project project, ErrorCollection errorCollection)
{
  boolean internalError = false;
  if (projectRole == null)
  {
    errorCollection.addErrorMessage(getText("project.roles.service.error.project.role.actors.null.project.role"));
    internalError = true;
  }
  if (project == null)
  {
    errorCollection.addErrorMessage(getText("project.roles.service.error.project.role.actors.null.project"));
    internalError = true;
  }
  ProjectRoleActors projectRoleActors = null;
  if (!internalError && hasProjectRolePermission(currentUser, project))
  {
    projectRoleActors = projectRoleManager.getProjectRoleActors(projectRole, project);
  }
  else
  {
    errorCollection.addErrorMessage(getText("project.roles.service.error.project.permission"), ErrorCollection.Reason.FORBIDDEN);
  }
  return projectRoleActors;
}
com.atlassian.jira.security.rolesProjectRoleManagergetProjectRoleActors

Javadoc

This method will retrieve the object that represents the actors associate with the given projectRole and project context

Popular methods of ProjectRoleManager

  • getProjectRole
    Retrieves a project role object by name
  • getProjectRoles
    This will return all the ProjectRoles that the user is currently a member of for the given project.
  • applyDefaultsRolesToProject
    This method will insert all the default roles into the role associations for the provided project. I
  • createProjectIdToProjectRolesMap
  • createRole
    Creates a project role object
  • deleteRole
    Deletes a project role object
  • getDefaultRoleActors
    This method will return the default role actors for a ProjectRole
  • getProjectIdsContainingRoleActorByNameAndType
    Returns the project id's which contain a role actor of the specified name and type within any role.
  • getProjectIdsForUserInGroupsBecauseOfRole
    Returns a Map of Lists. The key of the map is a Long, project id and the value of the map is a list
  • isRoleNameUnique
    Will tell you if a role name exists or not.
  • isUserInProjectRole
    Returns true only if the given user is in the given project role for the given project. This could b
  • removeAllRoleActorsByNameAndType
    This will remove all role actors with the specified name and the specified type. This method should
  • isUserInProjectRole,
  • removeAllRoleActorsByNameAndType,
  • removeAllRoleActorsByProject,
  • roleActorOfTypeExistsForProjects,
  • updateDefaultRoleActors,
  • updateProjectRoleActors,
  • updateRole

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • String (java.lang)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now