Skip to content

Commit

Permalink
fix Bug 65723
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbannov committed Jan 10, 2024
1 parent 1b233fe commit 836d307
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/ASC.Web.Api/Api/ConnectionsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ public async Task<object> LogOutAllActiveConnectionsChangePassword()
[HttpPut("activeconnections/logoutall/{userId}")]
public async Task LogOutAllActiveConnectionsForUserAsync(Guid userId)
{
if (!await _userManager.IsDocSpaceAdminAsync(_securityContext.CurrentAccount.ID)
&& !await _webItemSecurity.IsProductAdministratorAsync(WebItemManager.PeopleProductID, _securityContext.CurrentAccount.ID))
var currentUserId = _securityContext.CurrentAccount.ID;
if (!await _userManager.IsDocSpaceAdminAsync(currentUserId) &&
!await _webItemSecurity.IsProductAdministratorAsync(WebItemManager.PeopleProductID, currentUserId) ||
(currentUserId != userId && await _userManager.IsDocSpaceAdminAsync(userId)))
{
throw new SecurityException("Method not available");
}
Expand Down

0 comments on commit 836d307

Please sign in to comment.