Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ protected BaseProfileOrganizationResponseModel(
UseDisableSMAdsForUsers = organizationDetails.UseDisableSMAdsForUsers;
UsePasswordManager = organizationDetails.UsePasswordManager;
UseMyItems = organizationDetails.UseMyItems;
ExemptFromBillingAutomation = organizationDetails.ExemptFromBillingAutomation;
SelfHost = organizationDetails.SelfHost;
Seats = organizationDetails.Seats;
MaxCollections = organizationDetails.MaxCollections;
Expand Down Expand Up @@ -106,6 +107,7 @@ protected BaseProfileOrganizationResponseModel(
public bool UseDisableSMAdsForUsers { get; set; }
public bool UsePhishingBlocker { get; set; }
public bool UseMyItems { get; set; }
public bool ExemptFromBillingAutomation { get; set; }
public bool SelfHost { get; set; }
public int? Seats { get; set; }
public short? MaxCollections { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ public interface IProfileOrganizationDetails

bool UsePhishingBlocker { get; set; }
bool UseMyItems { get; set; }
bool ExemptFromBillingAutomation { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ public class OrganizationUserOrganizationDetails : IProfileOrganizationDetails
public bool UseDisableSMAdsForUsers { get; set; }
public bool UsePhishingBlocker { get; set; }
public bool UseMyItems { get; set; }
public bool ExemptFromBillingAutomation { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ public class ProviderUserOrganizationDetails : IProfileOrganizationDetails
public bool UseDisableSMAdsForUsers { get; set; }
public bool UsePhishingBlocker { get; set; }
public bool UseMyItems { get; set; }
public bool ExemptFromBillingAutomation { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ from os in os_g.DefaultIfEmpty()
UseDisableSMAdsForUsers = o.UseDisableSmAdsForUsers,
UsePhishingBlocker = o.UsePhishingBlocker,
UseMyItems = o.UseMyItems,
RevocationReason = ou.RevocationReason
RevocationReason = ou.RevocationReason,
ExemptFromBillingAutomation = o.ExemptFromBillingAutomation
};
return query;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ from ss in ss_g.DefaultIfEmpty()
SsoConfig = x.ss.Data,
UseDisableSMAdsForUsers = x.o.UseDisableSmAdsForUsers,
UsePhishingBlocker = x.o.UsePhishingBlocker,
UseMyItems = x.o.UseMyItems
UseMyItems = x.o.UseMyItems,
ExemptFromBillingAutomation = x.o.ExemptFromBillingAutomation
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ SELECT
O.[UsePhishingBlocker],
O.[UseDisableSmAdsForUsers],
O.[UseMyItems],
OU.[RevocationReason]
OU.[RevocationReason],
O.[ExemptFromBillingAutomation]
FROM
[dbo].[OrganizationUser] OU
LEFT JOIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ SELECT
SS.[Data] SsoConfig,
O.[UsePhishingBlocker],
O.[UseDisableSmAdsForUsers],
O.[UseMyItems]
O.[UseMyItems],
O.[ExemptFromBillingAutomation]
FROM
[dbo].[ProviderUser] PU
INNER JOIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void Constructor_ShouldPopulatePropertiesCorrectly(Organization organizat
UseOrganizationDomains = organization.UseOrganizationDomains,
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies,
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation,
ExemptFromBillingAutomation = organization.ExemptFromBillingAutomation,
SelfHost = organization.SelfHost,
Seats = organization.Seats,
MaxCollections = organization.MaxCollections,
Expand Down Expand Up @@ -148,5 +149,6 @@ public void Constructor_ShouldPopulatePropertiesCorrectly(Organization organizat
Assert.Equal(organizationDetails.FamilySponsorshipValidUntil, result.FamilySponsorshipValidUntil);
Assert.True(result.IsAdminInitiated);
Assert.False(result.FamilySponsorshipAvailable);
Assert.Equal(organization.ExemptFromBillingAutomation, result.ExemptFromBillingAutomation);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void Constructor_ShouldPopulatePropertiesCorrectly(Organization organizat
UseOrganizationDomains = organization.UseOrganizationDomains,
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies,
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation,
ExemptFromBillingAutomation = organization.ExemptFromBillingAutomation,
SelfHost = organization.SelfHost,
Seats = organization.Seats,
MaxCollections = organization.MaxCollections,
Expand Down Expand Up @@ -127,5 +128,6 @@ public void Constructor_ShouldPopulatePropertiesCorrectly(Organization organizat
Assert.False(result.Permissions.ManageUsers);
Assert.False(result.ResetPasswordEnrolled);
Assert.False(result.AccessSecretsManager);
Assert.Equal(organization.ExemptFromBillingAutomation, result.ExemptFromBillingAutomation);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
CREATE OR ALTER VIEW [dbo].[ProviderUserProviderOrganizationDetailsView]
AS
SELECT
PU.[UserId],
PO.[OrganizationId],
O.[Name],
O.[Enabled],
O.[UsePolicies],
O.[UseSso],
O.[UseKeyConnector],
O.[UseScim],
O.[UseGroups],
O.[UseDirectory],
O.[UseEvents],
O.[UseTotp],
O.[Use2fa],
O.[UseApi],
O.[UseResetPassword],
O.[UseSecretsManager],
O.[UsePasswordManager],
O.[SelfHost],
O.[UsersGetPremium],
O.[UseCustomPermissions],
O.[Seats],
O.[MaxCollections],
COALESCE(O.[MaxStorageGbIncreased], O.[MaxStorageGb]) AS [MaxStorageGb],
O.[Identifier],
PO.[Key],
O.[PublicKey],
O.[PrivateKey],
PU.[Status],
PU.[Type],
PO.[ProviderId],
PU.[Id] ProviderUserId,
P.[Name] ProviderName,
O.[PlanType],
O.[LimitCollectionCreation],
O.[LimitCollectionDeletion],
O.[AllowAdminAccessToAllCollectionItems],
O.[UseRiskInsights],
O.[UseAdminSponsoredFamilies],
P.[Type] ProviderType,
O.[LimitItemDeletion],
O.[UseOrganizationDomains],
O.[UseAutomaticUserConfirmation],
SS.[Enabled] SsoEnabled,
SS.[Data] SsoConfig,
O.[UsePhishingBlocker],
O.[UseDisableSmAdsForUsers],
O.[UseMyItems],
O.[ExemptFromBillingAutomation]
FROM
[dbo].[ProviderUser] PU
INNER JOIN
[dbo].[ProviderOrganization] PO ON PO.[ProviderId] = PU.[ProviderId]
INNER JOIN
[dbo].[Organization] O ON O.[Id] = PO.[OrganizationId]
INNER JOIN
[dbo].[Provider] P ON P.[Id] = PU.[ProviderId]
LEFT JOIN
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = O.[Id]
GO

CREATE OR ALTER VIEW [dbo].[OrganizationUserOrganizationDetailsView]
AS
SELECT
OU.[UserId],
OU.[OrganizationId],
OU.[Id] OrganizationUserId,
O.[Name],
O.[Enabled],
O.[PlanType],
O.[UsePolicies],
O.[UseSso],
O.[UseKeyConnector],
O.[UseScim],
O.[UseGroups],
O.[UseDirectory],
O.[UseEvents],
O.[UseTotp],
O.[Use2fa],
O.[UseApi],
O.[UseResetPassword],
O.[SelfHost],
O.[UsersGetPremium],
O.[UseCustomPermissions],
O.[UseSecretsManager],
O.[Seats],
O.[MaxCollections],
COALESCE(O.[MaxStorageGbIncreased], O.[MaxStorageGb]) AS [MaxStorageGb],
O.[Identifier],
OU.[Key],
OU.[ResetPasswordKey],
O.[PublicKey],
O.[PrivateKey],
OU.[Status],
OU.[Type],
SU.[ExternalId] SsoExternalId,
OU.[Permissions],
PO.[ProviderId],
P.[Name] ProviderName,
P.[Type] ProviderType,
SS.[Enabled] SsoEnabled,
SS.[Data] SsoConfig,
OS.[FriendlyName] FamilySponsorshipFriendlyName,
OS.[LastSyncDate] FamilySponsorshipLastSyncDate,
OS.[ToDelete] FamilySponsorshipToDelete,
OS.[ValidUntil] FamilySponsorshipValidUntil,
OU.[AccessSecretsManager],
O.[UsePasswordManager],
O.[SmSeats],
O.[SmServiceAccounts],
O.[LimitCollectionCreation],
O.[LimitCollectionDeletion],
O.[AllowAdminAccessToAllCollectionItems],
O.[UseRiskInsights],
O.[LimitItemDeletion],
O.[UseAdminSponsoredFamilies],
O.[UseOrganizationDomains],
OS.[IsAdminInitiated],
O.[UseAutomaticUserConfirmation],
O.[UsePhishingBlocker],
O.[UseDisableSmAdsForUsers],
O.[UseMyItems],
OU.[RevocationReason],
O.[ExemptFromBillingAutomation]
FROM
[dbo].[OrganizationUser] OU
LEFT JOIN
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId]
LEFT JOIN
[dbo].[SsoUser] SU ON SU.[UserId] = OU.[UserId] AND SU.[OrganizationId] = OU.[OrganizationId]
LEFT JOIN
[dbo].[ProviderOrganization] PO ON PO.[OrganizationId] = O.[Id]
LEFT JOIN
[dbo].[Provider] P ON P.[Id] = PO.[ProviderId]
LEFT JOIN
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = OU.[OrganizationId]
LEFT JOIN
[dbo].[OrganizationSponsorship] OS ON OS.[SponsoringOrganizationUserID] = OU.[Id]
GO
Loading