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 ...@@ -12,6 +12,7 @@ class ProjectTeam
# @team << [@users, :master] # @team << [@users, :master]
# #
def <<(args) def <<(args)
return false if group_member_lock
users = args.first users = args.first
if users.respond_to?(:each) if users.respond_to?(:each)
...@@ -218,4 +219,8 @@ class ProjectTeam ...@@ -218,4 +219,8 @@ class ProjectTeam
def group def group
project.group project.group
end end
def group_member_lock
group && group.membership_lock
end
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