Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Fix/xxxx-activateGitlab
  • Fix/xxxx-enableResTypesForAllOrgas
  • Fix/xxxx-resourceVisibility
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1035-fixResourceApi
  • Hotfix/1308-versionConflict
  • Hotfix/1357-ymlFile
  • Hotfix/1370-swaggerDescription
  • Hotfix/1391-DisplayCorrectQuota
  • Hotfix/1474-asyncResourceCreation
  • Hotfix/1584-fixResourceLoader
  • Hotfix/1668-versionResourceConfigDepVersion
  • Hotfix/1702-fixReadOnly
  • Hotfix/2087-efNet6
  • Hotfix/2202-fixNaNQuota
  • Hotfix/2203-quotaMembersFix
  • Hotfix/2213-quotaLogic
  • Hotfix/2224-quotaSizeAnalytics
  • Hotfix/2313-fixModifiedDate
  • Hotfix/2371-fixGitLabinRCV
  • Hotfix/2377-hidingSensibleInformationGuestRole
  • Hotfix/2382-guestStillBuggy
  • Hotfix/2392-fixEmptyResult
  • Hotfix/2427-adminTrouble
  • Hotfix/2428-savingRwthRdsS3
  • Hotfix/2455-missingQuotaCheck
  • Hotfix/64-releaseUDE
  • Hotfix/73-fixResourceCreateRDS
  • Hotfix/xxxx-resourceTypesVersion
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1867-addNewResourceTypes
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1878-addNewResourceTypes
  • Issue/1910-MigrationtoNET6.0
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1940ResouceKeysForNRWAndTUDO
  • Issue/1951-quotaImplementation
  • Issue/1976-resouceCreationVaildEmail
  • Issue/2000-gitlabResourcesAPI
  • Issue/2001-extendAnalyticsLogger
  • Issue/2008-quotaManagement
  • Issue/2061-activateResourceTypeRdss3nrw
  • Issue/2072-wormResourceType
  • Issue/2101-gitLabResTypeUi
  • Issue/2126-formValidatorOnResourceEdit
  • Issue/2155-ArchiveLinkedResource
  • Issue/2193-resourceScopingSearch
  • Issue/2222-resourceDateCreated
  • Issue/2259-updatePids
  • Issue/2275-DocuGitlabResourceType
  • Issue/2278-gitlabToS
  • Issue/2279-gitlabMetaInformation
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2326-supportedOrganizations
  • Issue/2328-noFailOnLog
  • Issue/2349-gitlabHttps
  • Issue/2414-resourceTypesAffilAndAllocQuota
  • Product/1100-fdsS3
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1555-readOnlyResources
  • Product/1573-ReadOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Sprint/2020-20
  • Sprint/2020-21
  • Sprint/2020-22
  • Sprint/2021-02
  • Sprint/2021-03
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-13
  • Sprint/2021-15
  • Sprint/2021-18
  • Sprint/2021-19
  • Sprint/2021-23
  • Sprint/2022-01
  • Sprint/2022-05
  • Test/xxxx-enablingGitLab
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1221-LoggingExtended
  • Topic/1292-FdsS3
  • Topic/1335-dotnet5Apis
  • Topic/1572-ExtendResourcesAPI
  • Topic/1597-AddArchiveFlagInResourceObject
  • Topic/1711-extendResourceTypeConfiguration
  • Topic/1714-newResourceTypesUDE
  • dev
  • gitkeep
  • master
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.5.2
  • v1.5.3
  • v1.6.0
  • v1.6.1
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.1.3
  • v2.1.4
  • v2.10.0
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.3.1
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.4.3
  • v2.4.4
  • v2.5.0
  • v2.5.1
  • v2.6.0
  • v2.6.1
  • v2.7.0
  • v2.8.0
  • v2.8.1
  • v2.8.2
  • v2.8.3
  • v2.9.0
  • v2.9.1
  • v2.9.2
  • v2.9.3
  • v2.9.4
  • v2.9.5
  • v2.9.6
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.0.7
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.2.3
  • v3.2.4
  • v3.2.5
  • v3.3.0
  • v3.3.1
  • v3.3.2
  • v3.3.3
  • v3.4.0
  • v3.4.1
  • v3.4.2
  • v3.4.3
  • v3.4.4
  • v3.5.0
  • v3.5.1
  • v3.5.2
  • v3.5.3
  • v3.5.4
  • v3.5.5
  • v3.5.6
  • v3.5.7
179 results

Target

Select target project
  • coscine/backend/apis/resources
1 result
Select Git revision
  • Fix/xxxx-activateGitlab
  • Fix/xxxx-enableResTypesForAllOrgas
  • Fix/xxxx-resourceVisibility
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1035-fixResourceApi
  • Hotfix/1308-versionConflict
  • Hotfix/1357-ymlFile
  • Hotfix/1370-swaggerDescription
  • Hotfix/1391-DisplayCorrectQuota
  • Hotfix/1474-asyncResourceCreation
  • Hotfix/1584-fixResourceLoader
  • Hotfix/1668-versionResourceConfigDepVersion
  • Hotfix/1702-fixReadOnly
  • Hotfix/2087-efNet6
  • Hotfix/2202-fixNaNQuota
  • Hotfix/2203-quotaMembersFix
  • Hotfix/2213-quotaLogic
  • Hotfix/2224-quotaSizeAnalytics
  • Hotfix/2313-fixModifiedDate
  • Hotfix/2371-fixGitLabinRCV
  • Hotfix/2377-hidingSensibleInformationGuestRole
  • Hotfix/2382-guestStillBuggy
  • Hotfix/2392-fixEmptyResult
  • Hotfix/2427-adminTrouble
  • Hotfix/2428-savingRwthRdsS3
  • Hotfix/2455-missingQuotaCheck
  • Hotfix/64-releaseUDE
  • Hotfix/73-fixResourceCreateRDS
  • Hotfix/xxxx-resourceTypesVersion
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1867-addNewResourceTypes
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1878-addNewResourceTypes
  • Issue/1910-MigrationtoNET6.0
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1940ResouceKeysForNRWAndTUDO
  • Issue/1951-quotaImplementation
  • Issue/1976-resouceCreationVaildEmail
  • Issue/2000-gitlabResourcesAPI
  • Issue/2001-extendAnalyticsLogger
  • Issue/2008-quotaManagement
  • Issue/2061-activateResourceTypeRdss3nrw
  • Issue/2072-wormResourceType
  • Issue/2101-gitLabResTypeUi
  • Issue/2126-formValidatorOnResourceEdit
  • Issue/2155-ArchiveLinkedResource
  • Issue/2193-resourceScopingSearch
  • Issue/2222-resourceDateCreated
  • Issue/2259-updatePids
  • Issue/2275-DocuGitlabResourceType
  • Issue/2278-gitlabToS
  • Issue/2279-gitlabMetaInformation
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2326-supportedOrganizations
  • Issue/2328-noFailOnLog
  • Issue/2349-gitlabHttps
  • Issue/2414-resourceTypesAffilAndAllocQuota
  • Product/1100-fdsS3
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1555-readOnlyResources
  • Product/1573-ReadOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Sprint/2020-20
  • Sprint/2020-21
  • Sprint/2020-22
  • Sprint/2021-02
  • Sprint/2021-03
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-13
  • Sprint/2021-15
  • Sprint/2021-18
  • Sprint/2021-19
  • Sprint/2021-23
  • Sprint/2022-01
  • Sprint/2022-05
  • Test/xxxx-enablingGitLab
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1221-LoggingExtended
  • Topic/1292-FdsS3
  • Topic/1335-dotnet5Apis
  • Topic/1572-ExtendResourcesAPI
  • Topic/1597-AddArchiveFlagInResourceObject
  • Topic/1711-extendResourceTypeConfiguration
  • Topic/1714-newResourceTypesUDE
  • dev
  • gitkeep
  • master
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.5.2
  • v1.5.3
  • v1.6.0
  • v1.6.1
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.1.3
  • v2.1.4
  • v2.10.0
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.3.1
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.4.3
  • v2.4.4
  • v2.5.0
  • v2.5.1
  • v2.6.0
  • v2.6.1
  • v2.7.0
  • v2.8.0
  • v2.8.1
  • v2.8.2
  • v2.8.3
  • v2.9.0
  • v2.9.1
  • v2.9.2
  • v2.9.3
  • v2.9.4
  • v2.9.5
  • v2.9.6
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.0.7
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.2.3
  • v3.2.4
  • v3.2.5
  • v3.3.0
  • v3.3.1
  • v3.3.2
  • v3.3.3
  • v3.4.0
  • v3.4.1
  • v3.4.2
  • v3.4.3
  • v3.4.4
  • v3.5.0
  • v3.5.1
  • v3.5.2
  • v3.5.3
  • v3.5.4
  • v3.5.5
  • v3.5.6
  • v3.5.7
179 results
Show changes
Commits on Source (3)
......@@ -84,7 +84,10 @@ namespace Coscine.Api.Resources.Controllers
{
var resource = _resourceModel.GetById(id);
var user = _authenticator.GetUser();
if (_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member))
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Resource: View Resource (RCV, Metadatamanager)
if (_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member, UserRoles.Guest))
{
_resourceModel.SetType(resource);
......@@ -137,6 +140,8 @@ namespace Coscine.Api.Resources.Controllers
{
var user = _authenticator.GetUser();
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Resource: Change Resource Settings
if (_resourceModel.HasAccess(user, resource, UserRoles.Owner) ||
(_resourceModel.HasAccess(user, resource, UserRoles.Member) && resource.Creator.Equals(user.Id)))
{
......@@ -183,6 +188,8 @@ namespace Coscine.Api.Resources.Controllers
var resource = _resourceModel.GetById(id);
var user = _authenticator.GetUser();
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Resource: Change Resource Settings
if (_resourceModel.HasAccess(user, resource, UserRoles.Owner) ||
(_resourceModel.HasAccess(user, resource, UserRoles.Member) && resource.Creator.Equals(user.Id)))
{
......@@ -228,6 +235,8 @@ namespace Coscine.Api.Resources.Controllers
var resource = _resourceModel.GetById(id);
var user = _authenticator.GetUser();
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Resource: Change Resource Settings
if (_resourceModel.HasAccess(user, resource, UserRoles.Owner) ||
(_resourceModel.HasAccess(user, resource, UserRoles.Member) && resource.Creator.Equals(user.Id)))
{
......@@ -285,6 +294,8 @@ namespace Coscine.Api.Resources.Controllers
return Unauthorized("Access denied!");
}
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Resource: Create Resource
if (projectModel.HasAccess(user, project, UserRoles.Owner, UserRoles.Member))
{
if (!resourceType.Enabled.HasValue || !resourceType.Enabled.Value)
......
......@@ -64,9 +64,11 @@ namespace Coscine.Api.Resources.Controllers
var projectId = _projectResourceModel.GetWhere(x => x.ResourceId == id).ProjectId;
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Project: View Settings (project, user, quota)
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!");
return Unauthorized("The user is not authorized to view resource quotas on the selected project!");
}
var displayName = _resourceTypeModel.GetById(resource.TypeId).DisplayName;
......@@ -100,6 +102,8 @@ namespace Coscine.Api.Resources.Controllers
var projectId = _projectResourceModel.GetWhere(x => x.ResourceId == id).ProjectId;
var user = _authenticator.GetUser();
// Rights Matrix (https://git.rwth-aachen.de/coscine/docs/private/internal-wiki/-/blob/master/coscine/Definition%20of%20rights%20Matrix.md)
// - Project: Change Settings (project, user, quota)
if (!_projectModel.HasAccess(user, projectId, UserRoles.Owner) && resource.Creator != _authenticator.GetUser().Id)
{
return Unauthorized("The user is not authorized to perform a get on the selected project!");
......
using System;
namespace Coscine.Api.Resources.ParameterObjects;
namespace Coscine.Api.Resources.ParameterObjects;
/// <summary>
/// Parameter object containing the update information.
......
......@@ -5,7 +5,7 @@
<AssemblyName>Coscine.Api.Resources</AssemblyName>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net6.0</TargetFramework>
<Version>3.2.5</Version>
<Version>3.3.0</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
......