fix(permissions): 🐛 Improved the security around the role "Manage Own Requests" (#4397)

* Secure ManageOwnRequests API paths

Fixes #4391

* Hide delete request option if user is not allowed

* Refactor CheckOwnRequests

* Fix deleteRequest test

* Improve performance and clean up code

* Fix manageOwnRequests check

* Refactor CheckCanManageRequest
This commit is contained in:
sephrat 2021-11-11 11:21:44 +01:00 committed by GitHub
parent 4410790bc0
commit 334a32bca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 106 additions and 36 deletions

View file

@ -7,7 +7,7 @@ namespace Ombi.Core.Engine
{
public bool Result { get; set; }
public string Message { get; set; }
public bool IsError => !string.IsNullOrEmpty(ErrorMessage);
public bool IsError => ( !string.IsNullOrEmpty(ErrorMessage) || ErrorCode != null );
public string ErrorMessage { get; set; }
public ErrorCode? ErrorCode { get; set; }
public int RequestId { get; set; }