Commit d25b67c4 authored by Petar Hristov's avatar Petar Hristov 💬
Browse files

Merge branch 'Issues/0028-maxQuotaFix' into Topic/1714-newResourceTypesUDE

parents 60b8b558 930feb51
......@@ -586,7 +586,22 @@ namespace Coscine.Api.Project.Controllers
return Unauthorized("User is not allowed to create SubProjects.");
}
var project = _projectModel.StoreFromObject(projectObject, user, _rdfStoreConnector.GetQuotaDefault(user.Id.ToString()));
//var defaultQuotas = _rdfStoreConnector.GetQuotaDefault(user.Id.ToString());
var defaultQuotas = _rdfStoreConnector.GetQuotaDefault("224fee26-931c-4acd-83de-65eeb39bce78");
var projectQuotas = defaultQuotas.Select(defaulQuota =>
{
var resourceType = _resourceTypeModel.GetWhere(resourceType => resourceType.DisplayName == defaulQuota.ResourceType);
return new ProjectQuota
{
MaxQuota = defaulQuota.DefaultMaxQuota,
Quota = defaulQuota.DefaultQuota,
ResourceTypeId = resourceType.Id
};
});
var project = _projectModel.StoreFromObject(projectObject, user, projectQuotas);
if (projectObject.ParentId != new Guid()
// Both an owner and a member can add subprojects to projects
......
......@@ -19,9 +19,9 @@
<ItemGroup>
<PackageReference Include="Coscine.Action" Version="2.*-*" />
<PackageReference Include="Coscine.ApiCommons" Version="2.*-*" />
<PackageReference Include="Coscine.Database" Version="2.*-*" />
<PackageReference Include="Coscine.Database" Version="2.6.0-issues-0028-maxq0002" />
<PackageReference Include="Coscine.Logging" Version="2.*-*" />
<PackageReference Include="Coscine.Metadata" Version="2.*-*" />
<PackageReference Include="Coscine.Metadata" Version="2.3.0-issues-0028-maxq0002" />
<PackageReference Include="Coscine.ResourceLoader" Version="2.*-*" />
<PackageReference Include="Coscine.ResourceTypeBase" Version="2.*-*" />
</ItemGroup>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment