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?)