overview_sorting_policy.rb 325 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class User::OverviewSortingPolicy < ApplicationPolicy
  3. def show?
  4. same_user?
  5. end
  6. def create?
  7. same_user?
  8. end
  9. def update?
  10. same_user?
  11. end
  12. def destroy?
  13. same_user?
  14. end
  15. def same_user?
  16. record.user == user
  17. end
  18. end