mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-11162] Assign To Collections Permission Update (#11367)
Only users with Manage/Edit permissions will be allowed to Assign To Collections. If the user has Can Edit Except Password the collections dropdown will be disabled. --------- Co-authored-by: Matt Bishop <mbishop@bitwarden.com> Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
This commit is contained in:
@@ -123,6 +123,9 @@ export class EditCommand {
|
||||
"Item does not belong to an organization. Consider moving it first.",
|
||||
);
|
||||
}
|
||||
if (!cipher.viewPassword) {
|
||||
return Response.noEditPermission();
|
||||
}
|
||||
|
||||
cipher.collectionIds = req;
|
||||
try {
|
||||
|
||||
@@ -39,6 +39,10 @@ export class Response {
|
||||
return Response.error("Not found.");
|
||||
}
|
||||
|
||||
static noEditPermission(): Response {
|
||||
return Response.error("You do not have permission to edit this item");
|
||||
}
|
||||
|
||||
static badRequest(message: string): Response {
|
||||
return Response.error(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user