Skip to content
Snippets Groups Projects

Chore: 3.0.1

Merged Benedikt Heinrichs requested to merge master into dev
2 files
+ 4
4
Compare changes
  • Side-by-side
  • Inline

Files

@@ -29,7 +29,7 @@ namespace Coscine.Api.Resources.Controllers
private readonly ProjectQuotaModel _projectQuotaModel;
private readonly ProjectResourceModel _projectResourceModel;
private readonly ResourceTypeModel _resourceTypeModel;
private readonly float _oneGiB = 1024 * 1024 * 1024; // 1 GiB = 1024 Bytes
private readonly float _oneGiB = 1024 * 1024 * 1024; // 1 GiB = 1024 Bytes
/// <summary>
/// ResourceQuotaController constructor specifying a ResourceModel.
@@ -64,7 +64,7 @@ namespace Coscine.Api.Resources.Controllers
var projectId = _projectResourceModel.GetWhere(x => x.ResourceId == id).ProjectId;
if (!_projectModel.HasAccess(_authenticator.GetUser(), projectId, UserRoles.Owner) || resource.Creator != _authenticator.GetUser().Id)
if (!_projectModel.HasAccess(_authenticator.GetUser(), projectId, UserRoles.Owner, UserRoles.Member) && resource.Creator != _authenticator.GetUser().Id)
{
return Unauthorized("The user is not authorized to perform a get on the selected project!");
}
Loading