change_visibility.rb 308 B

1234567891011
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class Service::Ticket::Article::ChangeVisibility < Service::BaseWithCurrentUser
  3. def execute(article:, internal:)
  4. Pundit.authorize current_user, article, :update?
  5. article.update! internal: internal
  6. article
  7. end
  8. end