LeoMcA
(Leo McArdle)
October 28, 2015, 6:55pm
1
I understand that disabling invites is intended behaviour when local logins are disabled, but it seems to have the knock on effect of removing any way to add a new user to a PM:
SiteSetting.enable_local_logins &&
(
(!SiteSetting.must_approve_users? && @user.has_trust_level?(TrustLevel[2])) ||
is_staff?
) &&
(groups.blank? || is_admin?)
end
def can_invite_to?(object, group_ids=nil)
return false if ! authenticated?
return false unless ( SiteSetting.enable_local_logins && (!SiteSetting.must_approve_users? || is_staff?) )
return true if is_admin?
return false if (SiteSetting.max_invites_per_day.to_i == 0 && !is_staff?)
return false if ! can_see?(object)
return false if group_ids.present?
if object.is_a?(Topic) && object.category
if object.category.groups.any?
return true if object.category.groups.all? { |g| can_edit_group?(g) }
end
end
1 Like
Maybe, @techapj can you have a look?
techAPJ
(Arpit Jalan)
October 30, 2015, 6:30am
3
Fixed via:
committed 05:58AM - 30 Oct 15 UTC
Also note that now user will also be able to invite existing users to a topic when local logins are disabled.
6 Likes