mirror of
https://github.com/bitwarden/browser
synced 2026-02-19 19:04:01 +00:00
fix: use manageDeviceApproval permission method, refs PM-22392
This commit is contained in:
@@ -35,7 +35,7 @@ export class ApproveAllCommand {
|
||||
.organizations$(userId)
|
||||
.pipe(map((organizations) => organizations.find((o) => o.id === organizationId))),
|
||||
);
|
||||
if (!organization?.canManageUsersPassword) {
|
||||
if (!organization?.canManageDeviceApprovals) {
|
||||
return Response.error(
|
||||
"You do not have permission to approve pending device authorization requests.",
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@ export class ApproveCommand {
|
||||
.organizations$(userId)
|
||||
.pipe(map((organizations) => organizations?.find((o) => o.id === organizationId))),
|
||||
);
|
||||
if (!organization?.canManageUsersPassword) {
|
||||
if (!organization?.canManageDeviceApprovals) {
|
||||
return Response.error(
|
||||
"You do not have permission to approve pending device authorization requests.",
|
||||
);
|
||||
|
||||
@@ -39,7 +39,7 @@ export class DenyAllCommand {
|
||||
.organizations$(userId)
|
||||
.pipe(map((organizations) => organizations.find((o) => o.id === organizationId))),
|
||||
);
|
||||
if (!organization?.canManageUsersPassword) {
|
||||
if (!organization?.canManageDeviceApprovals) {
|
||||
return Response.error(
|
||||
"You do not have permission to approve pending device authorization requests.",
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ export class DenyCommand {
|
||||
.organizations$(userId)
|
||||
.pipe(map((organizations) => organizations.find((o) => o.id === organizationId))),
|
||||
);
|
||||
if (!organization?.canManageUsersPassword) {
|
||||
if (!organization?.canManageDeviceApprovals) {
|
||||
return Response.error(
|
||||
"You do not have permission to approve pending device authorization requests.",
|
||||
);
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ListCommand {
|
||||
.organizations$(userId)
|
||||
.pipe(map((organizations) => organizations.find((o) => o.id === organizationId))),
|
||||
);
|
||||
if (!organization?.canManageUsersPassword) {
|
||||
if (!organization?.canManageDeviceApprovals) {
|
||||
return Response.error(
|
||||
"You do not have permission to approve pending device authorization requests.",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user