mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-12 19:17:13 +00:00
Fix: align bulk edit perms with document model (#13757)
This commit is contained in:
1 parent
bbcd6af2fe
commit
7e4a644714
3 files changed
+195
-23
No files matched your search
@@ -4879,10 +4879,11 @@ class BulkEditObjectsView(PassUserMixin):
|
||||
|
||||
if not user.is_superuser:
|
||||
perm = f"documents.{perm_codename}"
|
||||
# Limited to the owner (or unowned), same as documents, see BulkEditView
|
||||
has_perms = (
|
||||
user.has_perm(perm)
|
||||
and not objs.exclude(
|
||||
pk__in=permitted_object_ids(user, object_class, perm_codename),
|
||||
Q(owner=user) | Q(owner__isnull=True),
|
||||
).exists()
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user