mirror of
https://github.com/bitwarden/server
synced 2026-01-09 03:53:42 +00:00
[AC-434] Hide Billing screen for Reseller clients (#2783)
* [AC-434] Added ProviderType to ProfileOrganizationResponseModel * [AC-434] Migration script * [AC-434] Fixed indentation on migration script * [AC-434] Hiding sensitive subscription data if the user does not have permissions * [AC-434] Fixed missing dependency in unit test * [AC-434] Altered BillingSubscription.Amount and BillingSubscriptionUpcomingInvoice.Amount to nullable * [AC-434] Replaced CurrentContext.ManageBilling with ViewBillingHistory, ViewSubscription, EditSubscription and EditPaymentMethods * [AC-434] Reverted change on BillingSubscription.Amount and now setting Subscription.Items = null when User does not have permission * [AC-434] Added ProviderOrganizationProviderDetails_ReadByUserId * [AC-434] Added IProviderOrganizationRepository.GetManyByUserAsync * [AC-434] Added CurrentContext.GetOrganizationProviderDetails * [AC-434] Remove unneeded join Organization table
This commit is contained in:
@@ -263,6 +263,7 @@
|
||||
<Build Include="dbo\Stored Procedures\Policy_ReadByUserId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Policy_Update.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganizationOrganizationDetails_ReadByProviderId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganizationProviderDetails_ReadByUserId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Provider_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Organization_UnassignedToProviderSearch.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganization_Create.sql" />
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
CREATE PROCEDURE [dbo].[ProviderOrganizationProviderDetails_ReadByUserId]
|
||||
@UserId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
PO.Id,
|
||||
PO.OrganizationId,
|
||||
PO.ProviderId,
|
||||
P.Name as ProviderName,
|
||||
P.[Type] as ProviderType
|
||||
FROM
|
||||
[dbo].[ProviderOrganizationView] PO
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationUser] OU ON PO.OrganizationId = OU.OrganizationId
|
||||
INNER JOIN
|
||||
[dbo].[Provider] P ON PO.ProviderId = P.Id
|
||||
WHERE
|
||||
OU.UserId = @UserId
|
||||
END
|
||||
@@ -35,6 +35,7 @@ SELECT
|
||||
OU.[Permissions],
|
||||
PO.[ProviderId],
|
||||
P.[Name] ProviderName,
|
||||
P.[Type] ProviderType,
|
||||
SS.[Data] SsoConfig,
|
||||
OS.[FriendlyName] FamilySponsorshipFriendlyName,
|
||||
OS.[LastSyncDate] FamilySponsorshipLastSyncDate,
|
||||
|
||||
Reference in New Issue
Block a user