diff --git a/app/policies/document_policy.rb b/app/policies/document_policy.rb index 94b7138..fbdc686 100644 --- a/app/policies/document_policy.rb +++ b/app/policies/document_policy.rb @@ -20,6 +20,6 @@ def update? def user_is_editor? library_user = LibraryUser.find_by(user: user, library: document.library) - library_user&.editor? + library_user&.editor? || library_user&.admin? end end diff --git a/app/policies/library_policy.rb b/app/policies/library_policy.rb index 041f632..87782ca 100644 --- a/app/policies/library_policy.rb +++ b/app/policies/library_policy.rb @@ -20,6 +20,6 @@ def update? def user_is_editor? library_user = LibraryUser.find_by(user: user, library: library) - library_user&.editor? + library_user&.editor? || library_user&.admin? end end