Package com.google.testing.testify.risk.frontend.shared.rpc.UserRpc

Examples of com.google.testing.testify.risk.frontend.shared.rpc.UserRpc.ProjectAccess


      for (Project returnedProject : returnedProjects) {
        // Only returns the projects that are either:
        // * Starred by the user and have access (implicit or explicit).
        // * Granted VIEW or EDIT access explicitly. (Ignore public projects.)
        ProjectAccess access = userService.getAccessLevel(returnedProject);

        // If explicit, add it. Otherwise, check starred access (and implicit access).
        if (access.hasAccess(ProjectAccess.EXPLICIT_VIEW_ACCESS)) {
          projectsToReturn.add(returnedProject);
        } else if (access.hasAccess(ProjectAccess.VIEW_ACCESS)
            && starredProjects.contains(returnedProject.getProjectId())) {
          projectsToReturn.add(returnedProject);
        }
      }

View Full Code Here


    if (project == null) {
      log.warning("Call to hasAccess with a null project.");
      return false;
    }

    ProjectAccess accessHas = getAccessLevel(project, asEmail);
    log.info("Access has: " + accessHas.name() + " Access desired: " + accessLevel.name());
    return accessHas.hasAccess(accessLevel);
  }
View Full Code Here

TOP

Related Classes of com.google.testing.testify.risk.frontend.shared.rpc.UserRpc.ProjectAccess

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.