Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjetilhau committed Dec 5, 2024
1 parent 8a258ca commit a72c223
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public async Task<ActionResult<Guid>> UpdatePortal([FromRoute] Guid portalId, [F
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -147,7 +147,7 @@ public async Task<ActionResult<Guid>> UpdatePortalConfiguration([FromRoute] Guid
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -290,7 +290,7 @@ public async Task<ActionResult<Guid>> AddAppToPortal([FromRoute] Guid portalId,
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -331,7 +331,7 @@ public async Task<ActionResult<Guid>> AddAppToPortal([FromRoute] Guid portalId,
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -374,7 +374,7 @@ public async Task<ActionResult> RemoveAppFromPortal([FromRoute] Guid portalId, [
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -420,7 +420,7 @@ public async Task<ActionResult<Guid>> AddContextTypeToPortal([FromRoute] Guid po
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -462,7 +462,7 @@ public async Task<ActionResult> RemoveContextTypeFromPortal([FromRoute] Guid por
{
#region Authorization

var authResult = await AuthorizeCanModifyPortal(portalId);
var authResult = await AuthorizeCanManagePortal(portalId);

if (authResult.Unauthorized)
{
Expand Down Expand Up @@ -492,7 +492,7 @@ public async Task<ActionResult> RemoveContextTypeFromPortal([FromRoute] Guid por
return Ok();
}

private async Task<AuthorizationOutcome> AuthorizeCanModifyPortal(Guid portalId)
private async Task<AuthorizationOutcome> AuthorizeCanManagePortal(Guid portalId)
{
var authResult = await Request.RequireAuthorizationAsync(builder =>
{
Expand Down

0 comments on commit a72c223

Please sign in to comment.