1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

[AC-1139] Renamed FlexibleCollectionsIsEnabled properties to UseFlexibleCollections

This commit is contained in:
Rui Tome
2023-10-30 12:38:18 +00:00
parent 9c5f580035
commit 1a56c359fa
9 changed files with 33 additions and 33 deletions

View File

@ -38,7 +38,7 @@ public class OrganizationUsersController : Controller
private readonly IFeatureService _featureService;
private readonly IAuthorizationService _authorizationService;
private bool FlexibleCollectionsIsEnabled => _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
private bool UseFlexibleCollections => _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
public OrganizationUsersController(
IOrganizationRepository organizationRepository,
@ -92,7 +92,7 @@ public class OrganizationUsersController : Controller
[HttpGet("")]
public async Task<ListResponseModel<OrganizationUserUserDetailsResponseModel>> Get(Guid orgId, bool includeGroups = false, bool includeCollections = false)
{
var authorized = FlexibleCollectionsIsEnabled
var authorized = UseFlexibleCollections
? (await _authorizationService.AuthorizeAsync(User, null, OrganizationUserOperations.ReadAll(orgId))).Succeeded
: await _currentContext.ViewAllCollections(orgId) ||
await _currentContext.ViewAssignedCollections(orgId) ||