public IHttpActionResult PostRelationalDatabaseServices([FromBody] RelationalDatabaseStorageService Service) { if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.PostRelationalDatabaseService(Service))); }
public IHttpActionResult GetServices() { if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.GetServices())); }
public IHttpActionResult GetUsers() { if (!_SecRepo.IsAllowed(User.Identity.Name, "edit-security-guidelines")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.GetUsers())); }
public IHttpActionResult PostUseCase([FromBody] UseCase useCase) { if (!_SecRepo.IsAllowed(User.Identity.Name, "manage-use-cases")) { return(StatusCode(HttpStatusCode.Forbidden)); } var result = _Repo.PostUseCase(useCase); if (result.error == null) { return(Content(result.state, result.content)); } return(Content(result.state, result.error)); }
public IHttpActionResult PostDataLocationType([FromBody] DataLocationType DataLocationType) { if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.PostDataLocationType(DataLocationType))); }
public IHttpActionResult PostDeploymentInfo([FromBody] Certificate Certficate) { if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.PostCertificate(Certficate))); }
public IHttpActionResult PostProvider([FromBody] Provider Provider) { if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.PostProvider(Provider))); }
public IHttpActionResult PostOnlineDriveStorageServices([FromBody] OnlineDriveStorageService Service) { if (!ModelState.IsValid) { return(BadRequest()); } if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } var _Resp = _Repo.PostOnlineDriveStorageService(Service); if (_Resp == null) { return(NotFound()); } return(Ok(_Resp)); }
public IHttpActionResult PostServiceModel([FromBody] CloudServiceModel ServiceModel) { if (!_SecRepo.IsAllowed(User.Identity.Name, "create-services")) { return(StatusCode(HttpStatusCode.Forbidden)); } return(Ok(_Repo.PostServiceModel(ServiceModel))); }