mirror of
https://github.com/bitwarden/server
synced 2025-12-29 06:33:43 +00:00
25 lines
785 B
C#
25 lines
785 B
C#
using Bit.Core.Enums;
|
|
using Bit.Core.Models.Data;
|
|
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.Context;
|
|
|
|
public class CurrentContentOrganization
|
|
{
|
|
public CurrentContentOrganization() { }
|
|
|
|
public CurrentContentOrganization(OrganizationUserOrganizationDetails orgUser)
|
|
{
|
|
Id = orgUser.OrganizationId;
|
|
Type = orgUser.Type;
|
|
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(orgUser.Permissions);
|
|
AccessSecretsManager = orgUser.AccessSecretsManager && orgUser.UseSecretsManager;
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public OrganizationUserType Type { get; set; }
|
|
public Permissions Permissions { get; set; }
|
|
public bool AccessSecretsManager { get; set; }
|
|
}
|