Skip to content

Commit

Permalink
Minor refactor based on PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
stage-rl committed Dec 4, 2023
1 parent 4b98f10 commit 6e9c3fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/policies/message_threads_tag_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def initialize(user, message_threads_tag)

class Scope < Scope
def resolve
scope_tags_to_accessible_by_user(scope)
end

def scope_tags_to_accessible_by_user(scope)
# user can change tags on message_threads that he already has access to
scope.where("EXISTS (
SELECT 1 FROM message_threads_tags AS message_threads_tags_2
Expand Down

0 comments on commit 6e9c3fd

Please sign in to comment.