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

* Initial commit of require sso authentication policy enforcement * Updated sproc to send UseSso flag // Updated base validator to send back error message // Added changes to EntityFramework (just so its there for the future * Update policy name // adjusted conditional to demorgan's * Updated sproc // Added migrator script * Added .sql file extension to DeleteOrgUserWithOrg migrator script * Added policy // edit // strings // validation to business portal * Change requests from review // Added Owner & Admin exemption * Updated repository function used to get org user's type * Updated with requested changes
31 lines
970 B
C#
31 lines
970 B
C#
using System;
|
|
using Bit.Core.Models.Table;
|
|
|
|
namespace Bit.Core.Models.Data
|
|
{
|
|
public class OrganizationAbility
|
|
{
|
|
public OrganizationAbility() { }
|
|
|
|
public OrganizationAbility(Organization organization)
|
|
{
|
|
Id = organization.Id;
|
|
UseEvents = organization.UseEvents;
|
|
Use2fa = organization.Use2fa;
|
|
Using2fa = organization.Use2fa && organization.TwoFactorProviders != null &&
|
|
organization.TwoFactorProviders != "{}";
|
|
UsersGetPremium = organization.UsersGetPremium;
|
|
Enabled = organization.Enabled;
|
|
UseSso = organization.UseSso;
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public bool UseEvents { get; set; }
|
|
public bool Use2fa { get; set; }
|
|
public bool Using2fa { get; set; }
|
|
public bool UsersGetPremium { get; set; }
|
|
public bool Enabled { get; set; }
|
|
public bool UseSso { get; set; }
|
|
}
|
|
}
|