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
  • Hotfix/1357-ymlFile
  • Hotfix/1370-swaggerDescription
  • Hotfix/1917-vocabCheck
  • Hotfix/2087-efNet6
  • Hotfix/2097-fixTimeFormat
  • Hotfix/82-updateDepsOfAPIs
  • Hotfix/xxxx-notExposedGraphs
  • Issue/1746-ApplicationProfileStoringMethod
  • Issue/1804-fixedValueFix
  • Issue/1826-versioning
  • Issue/1910-MigrationtoNET6.0
  • Issue/1938-internalHandling
  • Issue/2158-emailServicedesk
  • Issue/2309-docs
  • Product/1287-dotnet5Sharepoint
  • Product/1549-speedupQuerying
  • Product/934-documantationOfMetadataAPI
  • Sprint/2020-20
  • Sprint/2020-21
  • Sprint/2020-22
  • Sprint/2021-03
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-11
  • Sprint/2021-12
  • Sprint/2021-23
  • Sprint/2022-01
  • Topic/1082-documantationOfMetadatAPI
  • Topic/1335-dotnet5Apis
  • Topic/1598-speedupQuerying
  • dev
  • devops-aczepiel
  • gitkeep
  • master
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.0.3
  • v2.0.4
  • v2.1.0
  • v2.1.1
  • v2.2.0
  • v2.2.1
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.2.3
66 results

Target

Select target project
  • coscine/backend/apis/metadata
1 result
Select Git revision
  • Hotfix/1357-ymlFile
  • Hotfix/1370-swaggerDescription
  • Hotfix/1917-vocabCheck
  • Hotfix/2087-efNet6
  • Hotfix/2097-fixTimeFormat
  • Hotfix/82-updateDepsOfAPIs
  • Hotfix/xxxx-notExposedGraphs
  • Issue/1746-ApplicationProfileStoringMethod
  • Issue/1804-fixedValueFix
  • Issue/1826-versioning
  • Issue/1910-MigrationtoNET6.0
  • Issue/1938-internalHandling
  • Issue/2158-emailServicedesk
  • Issue/2309-docs
  • Product/1287-dotnet5Sharepoint
  • Product/1549-speedupQuerying
  • Product/934-documantationOfMetadataAPI
  • Sprint/2020-20
  • Sprint/2020-21
  • Sprint/2020-22
  • Sprint/2021-03
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-11
  • Sprint/2021-12
  • Sprint/2021-23
  • Sprint/2022-01
  • Topic/1082-documantationOfMetadatAPI
  • Topic/1335-dotnet5Apis
  • Topic/1598-speedupQuerying
  • dev
  • devops-aczepiel
  • gitkeep
  • master
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.0.3
  • v2.0.4
  • v2.1.0
  • v2.1.1
  • v2.2.0
  • v2.2.1
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.2.3
66 results
Show changes
Commits on Source (3)
......@@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using VDS.RDF;
......@@ -71,7 +72,12 @@ namespace Coscine.Api.Metadata.Controllers
[HttpGet("[controller]/profiles/{profile}")]
public IActionResult GetProfile(string profile)
{
string profileUrl = profile.StartsWith("http") ? HttpUtility.UrlDecode(profile) : $"{ApplicationProfileUrl}{profile}/";
var profileUrl = profile.StartsWith("http") ? HttpUtility.UrlDecode(profile) : $"{ApplicationProfileUrl}{profile}/";
if (!profileUrl.StartsWith(ApplicationProfileUrl))
{
return StatusCode((int)HttpStatusCode.Forbidden, $"Profile has to start with {ApplicationProfileUrl}!");
}
var graph = _rdfStoreConnector.GetGraph(profileUrl);
......@@ -100,10 +106,15 @@ namespace Coscine.Api.Metadata.Controllers
if (user == null || !_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member))
{
return Forbid("User is no project member!");
return StatusCode((int)HttpStatusCode.Forbidden, "User is no project member!");
}
string profileUrl = profile.StartsWith("http") ? HttpUtility.UrlDecode(profile) : $"{ApplicationProfileUrl}{profile}/";
var profileUrl = profile.StartsWith("http") ? HttpUtility.UrlDecode(profile) : $"{ApplicationProfileUrl}{profile}/";
if (!profileUrl.StartsWith(ApplicationProfileUrl))
{
return StatusCode((int)HttpStatusCode.Forbidden, $"Profile has to start with {ApplicationProfileUrl}!");
}
var graph = _rdfStoreConnector.GetGraph(profileUrl);
var fixedValuesGraph = new Graph();
......
......@@ -5,7 +5,7 @@
<AssemblyName>Coscine.Api.Metadata</AssemblyName>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net5.0</TargetFramework>
<Version>2.2.0</Version>
<Version>2.2.1</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
......