Package com.atlassian.jira.security.roles

Examples of com.atlassian.jira.security.roles.ProjectRoleManager


      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }
      return rm.isUserInProjectRole(user, role, project);
    }
View Full Code Here


    public boolean matches(User user) {
      if (myRoleId == 0) {
        return false;
      }

      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }

      List<Project> projects;
      if (myProjectId == 0) {
        StructureConfiguration configuration = ComponentAccessor.getOSGiComponentInstanceOfType(StructureConfiguration.class);
        if (configuration == null) {
          return false;
        }
        projects = configuration.getCurrentlyEnabledProjects();
      } else {
        ProjectManager pm = ComponentAccessor.getProjectManager();
        Project project = pm.getProjectObj(myProjectId);
        projects = project == null ? Collections.<Project>emptyList() : Collections.singletonList(project);
      }

      for (Project project : projects) {
        if (rm.isUserInProjectRole(user, role, project)) {
          return true;
        }
      }
      return false;
    }
View Full Code Here

      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }
      return rm.isUserInProjectRole(user, role, project);
    }
View Full Code Here

      ProjectManager pm = ComponentManager.getInstance().getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }
      return rm.isUserInProjectRole(user, role, project);
    }
View Full Code Here

    public boolean matches(User user) {
      if (myRoleId == 0) {
        return false;
      }

      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }

      List<Project> projects;
      if (myProjectId == 0) {
        StructureConfiguration configuration = ComponentAccessor.getOSGiComponentInstanceOfType(StructureConfiguration.class);
        if (configuration == null) {
          return false;
        }
        projects = configuration.getCurrentlyEnabledProjects();
      } else {
        ProjectManager pm = ComponentAccessor.getProjectManager();
        Project project = pm.getProjectObj(myProjectId);
        projects = project == null ? Collections.<Project>emptyList() : Collections.singletonList(project);
      }

      for (Project project : projects) {
        if (rm.isUserInProjectRole(user, role, project)) {
          return true;
        }
      }
      return false;
    }
View Full Code Here

      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }
      return rm.isUserInProjectRole(user, role, project);
    }
View Full Code Here

      ProjectManager pm = ComponentManager.getInstance().getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }
      return rm.isUserInProjectRole(user, role, project);
    }
View Full Code Here

      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
      if (role == null) {
        return false;
      }
      return rm.isUserInProjectRole(user, role, project);
    }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.security.roles.ProjectRoleManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.