mirror of
https://github.com/bitwarden/server.git
synced 2025-02-16 01:51:21 +01:00
added a status check to the read by minimum role proc (#1498)
This commit is contained in:
parent
53a93ffcea
commit
b726b08ea1
@ -397,7 +397,9 @@ namespace Bit.Core.Repositories.EntityFramework
|
|||||||
var dbContext = GetDatabaseContext(scope);
|
var dbContext = GetDatabaseContext(scope);
|
||||||
var query = dbContext.OrganizationUsers
|
var query = dbContext.OrganizationUsers
|
||||||
.Include(e => e.User)
|
.Include(e => e.User)
|
||||||
.Where(e => e.OrganizationId.Equals(organizationId) && e.Type <= minRole)
|
.Where(e => e.OrganizationId.Equals(organizationId) &&
|
||||||
|
e.Type <= minRole &&
|
||||||
|
e.Status == OrganizationUserStatusType.Confirmed)
|
||||||
.Select(e => new OrganizationUserUserDetails() {
|
.Select(e => new OrganizationUserUserDetails() {
|
||||||
Id = e.Id,
|
Id = e.Id,
|
||||||
Email = e.Email ?? e.User.Email
|
Email = e.Email ?? e.User.Email
|
||||||
|
@ -11,5 +11,6 @@ BEGIN
|
|||||||
[dbo].[OrganizationUserUserDetailsView]
|
[dbo].[OrganizationUserUserDetailsView]
|
||||||
WHERE
|
WHERE
|
||||||
OrganizationId = @OrganizationId
|
OrganizationId = @OrganizationId
|
||||||
|
AND Status = 2 -- 2 = Confirmed
|
||||||
AND [Type] <= @MinRole
|
AND [Type] <= @MinRole
|
||||||
END
|
END
|
||||||
|
@ -17,5 +17,6 @@ BEGIN
|
|||||||
[dbo].[OrganizationUserUserDetailsView]
|
[dbo].[OrganizationUserUserDetailsView]
|
||||||
WHERE
|
WHERE
|
||||||
OrganizationId = @OrganizationId
|
OrganizationId = @OrganizationId
|
||||||
|
AND Status = 2
|
||||||
AND [Type] <= @MinRole
|
AND [Type] <= @MinRole
|
||||||
END
|
END
|
||||||
|
Loading…
Reference in New Issue
Block a user