mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:37:55 +08:00
FEATURE: add a button on admin user page that links to action log
This commit is contained in:
@ -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?)
|
||||
|
Reference in New Issue
Block a user