mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 11:04:31 -05:00
Modified view and models to pull Provider Type from the provider table for The ProviderUserOrganizationDetailsViewQuery (#5215)
This commit is contained in:
parent
03feb038b7
commit
217b86ba9e
@ -43,6 +43,7 @@ public class ProfileProviderOrganizationResponseModel : ProfileOrganizationRespo
|
|||||||
UserId = organization.UserId;
|
UserId = organization.UserId;
|
||||||
ProviderId = organization.ProviderId;
|
ProviderId = organization.ProviderId;
|
||||||
ProviderName = organization.ProviderName;
|
ProviderName = organization.ProviderName;
|
||||||
|
ProviderType = organization.ProviderType;
|
||||||
ProductTierType = StaticStore.GetPlan(organization.PlanType).ProductTier;
|
ProductTierType = StaticStore.GetPlan(organization.PlanType).ProductTier;
|
||||||
LimitCollectionCreation = organization.LimitCollectionCreation;
|
LimitCollectionCreation = organization.LimitCollectionCreation;
|
||||||
LimitCollectionDeletion = organization.LimitCollectionDeletion;
|
LimitCollectionDeletion = organization.LimitCollectionDeletion;
|
||||||
|
@ -44,4 +44,5 @@ public class ProviderUserOrganizationDetails
|
|||||||
public bool LimitCollectionDeletion { get; set; }
|
public bool LimitCollectionDeletion { get; set; }
|
||||||
public bool AllowAdminAccessToAllCollectionItems { get; set; }
|
public bool AllowAdminAccessToAllCollectionItems { get; set; }
|
||||||
public bool UseRiskInsights { get; set; }
|
public bool UseRiskInsights { get; set; }
|
||||||
|
public ProviderType ProviderType { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ public class ProviderUserOrganizationDetailsViewQuery : IQuery<ProviderUserOrgan
|
|||||||
LimitCollectionDeletion = x.o.LimitCollectionDeletion,
|
LimitCollectionDeletion = x.o.LimitCollectionDeletion,
|
||||||
AllowAdminAccessToAllCollectionItems = x.o.AllowAdminAccessToAllCollectionItems,
|
AllowAdminAccessToAllCollectionItems = x.o.AllowAdminAccessToAllCollectionItems,
|
||||||
UseRiskInsights = x.o.UseRiskInsights,
|
UseRiskInsights = x.o.UseRiskInsights,
|
||||||
|
ProviderType = x.p.Type
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,8 @@ SELECT
|
|||||||
O.[LimitCollectionCreation],
|
O.[LimitCollectionCreation],
|
||||||
O.[LimitCollectionDeletion],
|
O.[LimitCollectionDeletion],
|
||||||
O.[AllowAdminAccessToAllCollectionItems],
|
O.[AllowAdminAccessToAllCollectionItems],
|
||||||
O.[UseRiskInsights]
|
O.[UseRiskInsights],
|
||||||
|
P.[Type] ProviderType
|
||||||
FROM
|
FROM
|
||||||
[dbo].[ProviderUser] PU
|
[dbo].[ProviderUser] PU
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
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.[SelfHost],
|
||||||
|
O.[UsersGetPremium],
|
||||||
|
O.[UseCustomPermissions],
|
||||||
|
O.[Seats],
|
||||||
|
O.[MaxCollections],
|
||||||
|
O.[MaxStorageGb],
|
||||||
|
O.[Identifier],
|
||||||
|
PO.[Key],
|
||||||
|
O.[PublicKey],
|
||||||
|
O.[PrivateKey],
|
||||||
|
PU.[Status],
|
||||||
|
PU.[Type],
|
||||||
|
PO.[ProviderId],
|
||||||
|
PU.[Id] ProviderUserId,
|
||||||
|
P.[Name] ProviderName,
|
||||||
|
O.[PlanType],
|
||||||
|
O.[LimitCollectionCreationDeletion], -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||||
|
O.[LimitCollectionCreation],
|
||||||
|
O.[LimitCollectionDeletion],
|
||||||
|
O.[AllowAdminAccessToAllCollectionItems],
|
||||||
|
O.[UseRiskInsights],
|
||||||
|
P.[Type] ProviderType
|
||||||
|
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]
|
||||||
|
GO
|
Loading…
x
Reference in New Issue
Block a user