Skip to content

Commit

Permalink
allow admin role
Browse files Browse the repository at this point in the history
  • Loading branch information
theswamis committed Jun 18, 2024
1 parent c7555ba commit b2a919f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/policies/document_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/policies/library_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b2a919f

Please sign in to comment.