fix for isadmin

This commit is contained in:
Hamid Reza Mohammadi 2021-03-23 10:46:10 +04:30
parent 5dd93d80f9
commit ef9ebde91f
2 changed files with 2 additions and 3 deletions

View File

@ -423,13 +423,12 @@ namespace RSecurityBackend.Controllers
}
/// <summary>
/// Checks if user is admin (if user does not have user:viewall permission list it will be failed for any user id other than himself/herself)
/// Checks if user is admin
/// </summary>
/// <returns></returns>
[HttpGet]
[Authorize]
[Route("isadmin")]
[Authorize(Policy = SecurableItem.UserEntityShortName + ":" + SecurableItem.ViewAllOperationShortName)]
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(bool))]
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
[ProducesResponseType((int)HttpStatusCode.Forbidden)]

View File

@ -147,7 +147,7 @@
</member>
<member name="M:RSecurityBackend.Controllers.AppUserControllerBase.IsAdmin(System.Guid)">
<summary>
Checks if user is admin (if user does not have user:viewall permission list it will be failed for any user id other than himself/herself)
Checks if user is admin
</summary>
<returns></returns>
</member>