logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

account_policy.rb (527B)


  1. # frozen_string_literal: true
  2. class AccountPolicy < ApplicationPolicy
  3. def index?
  4. staff?
  5. end
  6. def show?
  7. staff?
  8. end
  9. def suspend?
  10. staff? && !record.user&.staff?
  11. end
  12. def unsuspend?
  13. staff?
  14. end
  15. def silence?
  16. staff? && !record.user&.staff?
  17. end
  18. def unsilence?
  19. staff?
  20. end
  21. def redownload?
  22. admin?
  23. end
  24. def remove_avatar?
  25. staff?
  26. end
  27. def subscribe?
  28. admin?
  29. end
  30. def unsubscribe?
  31. admin?
  32. end
  33. def memorialize?
  34. admin? && !record.user&.admin?
  35. end
  36. end