public ProfileProviderOrganizationResponseModel(ProviderUserOrganizationDetails organization)
     : base("profileProviderOrganization")
 {
     Id                      = organization.OrganizationId.ToString();
     Name                    = organization.Name;
     UsePolicies             = organization.UsePolicies;
     UseSso                  = organization.UseSso;
     UseKeyConnector         = organization.UseKeyConnector;
     UseGroups               = organization.UseGroups;
     UseDirectory            = organization.UseDirectory;
     UseEvents               = organization.UseEvents;
     UseTotp                 = organization.UseTotp;
     Use2fa                  = organization.Use2fa;
     UseApi                  = organization.UseApi;
     UseResetPassword        = organization.UseResetPassword;
     UsersGetPremium         = organization.UsersGetPremium;
     SelfHost                = organization.SelfHost;
     Seats                   = organization.Seats;
     MaxCollections          = organization.MaxCollections;
     MaxStorageGb            = organization.MaxStorageGb;
     Key                     = organization.Key;
     HasPublicAndPrivateKeys = organization.PublicKey != null && organization.PrivateKey != null;
     Status                  = OrganizationUserStatusType.Confirmed; // Provider users are always confirmed
     Type                    = OrganizationUserType.Owner;           // Provider users behave like Owners
     Enabled                 = organization.Enabled;
     SsoBound                = false;
     Identifier              = organization.Identifier;
     Permissions             = new Permissions();
     ResetPasswordEnrolled   = false;
     UserId                  = organization.UserId?.ToString();
     ProviderId              = organization.ProviderId?.ToString();
     ProviderName            = organization.ProviderName;
 }
Ejemplo n.º 2
0
 public ProfileProviderOrganizationResponseModel(ProviderUserOrganizationDetails organization)
     : base("profileProviderOrganization")
 {
     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;
     UseResetPassword        = organization.UseResetPassword;
     UsersGetPremium         = organization.UsersGetPremium;
     SelfHost                = organization.SelfHost;
     Seats                   = organization.Seats;
     MaxCollections          = organization.MaxCollections;
     MaxStorageGb            = organization.MaxStorageGb;
     Key                     = organization.Key;
     HasPublicAndPrivateKeys = organization.PublicKey != null && organization.PrivateKey != null;
     Status                  = organization.Status;
     Type                    = organization.Type;
     Enabled                 = organization.Enabled;
     SsoBound                = !string.IsNullOrWhiteSpace(organization.SsoExternalId);
     Identifier              = organization.Identifier;
     Permissions             = CoreHelpers.LoadClassFromJsonData <Permissions>(organization.Permissions);
     ResetPasswordEnrolled   = organization.ResetPasswordKey != null;
     UserId                  = organization.UserId?.ToString();
     ProviderId              = organization.ProviderId?.ToString();
     ProviderName            = organization.ProviderName;
 }