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

I think this is more correct, admins/mods should always be able to invite

This commit is contained in:
Sam 2013-06-21 16:35:13 +10:00
parent 8b51b8c778
commit e53aa45f54
2 changed files with 13 additions and 6 deletions

View file

@ -176,11 +176,13 @@ class Guardian
is_me?(user)
end
# For now, can_invite_to is basically can_see?
def can_invite_to?(object)
authenticated? && can_see?(object) &&
not(SiteSetting.must_approve_users?) &&
(@user.has_trust_level?(:regular) || is_staff?)
authenticated? &&
can_see?(object) &&
(
(!SiteSetting.must_approve_users? && @user.has_trust_level?(:regular)) ||
is_staff?
)
end
def can_see_deleted_posts?