2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

FEATURE: add a button on admin user page that links to action log

This commit is contained in:
Arpit Jalan 2017-02-21 18:15:30 +05:30
parent b19dfba497
commit 046cbad10b
7 changed files with 39 additions and 2 deletions

View file

@ -158,6 +158,10 @@ class Guardian
# make it impossible to be the same user.
end
def can_view_action_logs?(target)
is_staff? && target && target.staff?
end
# Can we approve it?
def can_approve?(target)
is_staff? && target && not(target.approved?)