Package org.platformlayer.model

Examples of org.platformlayer.model.ProjectAuthorization


    return blobs;
  }

  @Path("{projectId}")
  public ServicesCollectionResource retrieveServiceList(@PathParam("projectId") String projectKey) {
    ProjectAuthorization authz = AuthenticationFilter.authorizeProject(getAuthenticationCredentials(),
        authTokenValidator, projectKey);
    if (authz == null) {
      throw new WebApplicationException(HttpServletResponse.SC_UNAUTHORIZED);
    }

    List<RoleId> roles = authz.getRoles();
    if (roles == null || !roles.contains(RoleId.OWNER)) {
      throw new WebApplicationException(HttpServletResponse.SC_UNAUTHORIZED);
    }

    // Note that we have a different notion of project id from the auth system
View Full Code Here


    }
    return auth;
  }

  protected ProjectAuthorization getProjectAuthorization() {
    ProjectAuthorization project = getScopeParameter(ProjectAuthorization.class, true);
    return project;
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.model.ProjectAuthorization

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.