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:
parent
b19dfba497
commit
046cbad10b
7 changed files with 39 additions and 2 deletions
|
@ -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?)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue