mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 05:00:19 -05:00

* Added UseSso bool to org * Update fields in migration script * bump version & check enabled flag on ssoConfig
54 lines
2.1 KiB
C#
54 lines
2.1 KiB
C#
using Bit.Core.Enums;
|
|
using Bit.Core.Models.Data;
|
|
|
|
namespace Bit.Core.Models.Api
|
|
{
|
|
public class ProfileOrganizationResponseModel : ResponseModel
|
|
{
|
|
public ProfileOrganizationResponseModel(OrganizationUserOrganizationDetails organization)
|
|
: base("profileOrganization")
|
|
{
|
|
Id = organization.OrganizationId.ToString();
|
|
Name = organization.Name;
|
|
UsePolicies = organization.UsePolicies;
|
|
UseSso = organization.UseSso;
|
|
UseGroups = organization.UseGroups;
|
|
UseDirectory = organization.UseDirectory;
|
|
UseEvents = organization.UseEvents;
|
|
UseTotp = organization.UseTotp;
|
|
Use2fa = organization.Use2fa;
|
|
UseApi = organization.UseApi;
|
|
UsersGetPremium = organization.UsersGetPremium;
|
|
SelfHost = organization.SelfHost;
|
|
Seats = organization.Seats;
|
|
MaxCollections = organization.MaxCollections;
|
|
MaxStorageGb = organization.MaxStorageGb;
|
|
Key = organization.Key;
|
|
Status = organization.Status;
|
|
Type = organization.Type;
|
|
Enabled = organization.Enabled;
|
|
}
|
|
|
|
public string Id { get; set; }
|
|
public string Name { get; set; }
|
|
public bool UsePolicies { get; set; }
|
|
public bool UseSso { get; set; }
|
|
public bool UseGroups { get; set; }
|
|
public bool UseDirectory { get; set; }
|
|
public bool UseEvents { get; set; }
|
|
public bool UseTotp { get; set; }
|
|
public bool Use2fa { get; set; }
|
|
public bool UseApi { get; set; }
|
|
public bool UseBusinessPortal => UsePolicies || UseSso; // TODO add events if needed
|
|
public bool UsersGetPremium { get; set; }
|
|
public bool SelfHost { get; set; }
|
|
public int Seats { get; set; }
|
|
public int MaxCollections { get; set; }
|
|
public short? MaxStorageGb { get; set; }
|
|
public string Key { get; set; }
|
|
public OrganizationUserStatusType Status { get; set; }
|
|
public OrganizationUserType Type { get; set; }
|
|
public bool Enabled { get; set; }
|
|
}
|
|
}
|