Commit c115d080 authored by Marin Jankovski's avatar Marin Jankovski

Prevent adding users to project team if group membership lock is in place.

parent 9c99c4fe
......@@ -12,6 +12,7 @@ class ProjectTeam
# @team << [@users, :master]
#
def <<(args)
return false if group_member_lock
users = args.first
if users.respond_to?(:each)
......@@ -218,4 +219,8 @@ class ProjectTeam
def group
project.group
end
def group_member_lock
group && group.membership_lock
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment