Commit 1e160df3 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Add member limit check in do_join_project

parent a98fff45
......@@ -639,7 +639,8 @@ def do_join_project(project_id, user_id):
membership = create_membership(project, user_id)
if join_policy == get_auto_accept_join_policy():
if (join_policy == get_auto_accept_join_policy() and
not project.violates_members_limit(adding=1)):
membership.accept()
trigger_sync()
return membership
......
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