-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 15-01-add-model-metadata-to-namesync-file-lock
- Loading branch information
Showing
406 changed files
with
5,526 additions
and
2,754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Altinn.Studio.Designer.Helpers; | ||
using Altinn.Studio.Designer.Services.Interfaces; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Altinn.Studio.Designer.Controllers | ||
{ | ||
[Route("designer/api/[controller]")] | ||
[ApiController] | ||
public class ContactController : ControllerBase | ||
{ | ||
private readonly IGitea _giteaService; | ||
|
||
public ContactController(IGitea giteaService) | ||
{ | ||
_giteaService = giteaService; | ||
} | ||
|
||
[AllowAnonymous] | ||
[HttpGet("belongs-to-org")] | ||
public async Task<IActionResult> BelongsToOrg() | ||
{ | ||
bool isNotAuthenticated = !AuthenticationHelper.IsAuthenticated(HttpContext); | ||
if (isNotAuthenticated) | ||
{ | ||
return Ok(new BelongsToOrgDto { BelongsToOrg = false }); | ||
} | ||
|
||
try | ||
{ | ||
var organizations = await _giteaService.GetUserOrganizations(); | ||
return Ok(new BelongsToOrgDto { BelongsToOrg = organizations.Count > 0 }); | ||
} | ||
catch (Exception) | ||
{ | ||
return Ok(new BelongsToOrgDto { BelongsToOrg = false }); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,9 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace Altinn.Studio.Designer.Enums | ||
{ | ||
/// <summary> | ||
/// Enum for reference types of resources in the resource registry | ||
/// </summary> | ||
public enum ReferenceType | ||
{ | ||
[EnumMember(Value = "Default")] | ||
Default = 0, | ||
|
||
[EnumMember(Value = "Uri")] | ||
Uri = 1, | ||
|
||
[EnumMember(Value = "DelegationSchemeId")] | ||
DelegationSchemeId = 2, | ||
|
||
[EnumMember(Value = "MaskinportenScope")] | ||
MaskinportenScope = 3, | ||
|
||
[EnumMember(Value = "ServiceCode")] | ||
ServiceCode = 4, | ||
|
||
[EnumMember(Value = "ServiceEditionCode")] | ||
ServiceEditionCode = 5, | ||
|
||
[EnumMember(Value = "ApplicationId")] | ||
ApplicationId = 6, | ||
LayoutSet, | ||
Layout, | ||
Component | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.