You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
483 B

  1. # frozen_string_literal: true
  2. class CustomEmojiPolicy < ApplicationPolicy
  3. def index?
  4. role.can?(:manage_custom_emojis)
  5. end
  6. def create?
  7. role.can?(:manage_custom_emojis)
  8. end
  9. def update?
  10. role.can?(:manage_custom_emojis)
  11. end
  12. def copy?
  13. role.can?(:manage_custom_emojis)
  14. end
  15. def enable?
  16. role.can?(:manage_custom_emojis)
  17. end
  18. def disable?
  19. role.can?(:manage_custom_emojis)
  20. end
  21. def destroy?
  22. role.can?(:manage_custom_emojis)
  23. end
  24. end