Fix the slightly incomplete logic for changing private story permissions
This commit fixes the validation to be less overzealous. Previously it was impossible to remove the last team from a story in the same PUT request as adding users when the permissions previously had no users, and vice versa. Change-Id: I16a7451e8c24da352357abb0590d0ace5b4e77f4
This commit is contained in:
parent
db050a3de6
commit
8a69377c46
@ -305,9 +305,9 @@ class StoriesController(rest.RestController):
|
||||
valid = True
|
||||
if users == [] and teams == []:
|
||||
valid = False
|
||||
elif users == [] and original_teams == []:
|
||||
elif users == [] and (original_teams == [] and not teams):
|
||||
valid = False
|
||||
elif teams == [] and original_users == []:
|
||||
elif teams == [] and (original_users == [] and not users):
|
||||
valid = False
|
||||
if not valid and original_story.private:
|
||||
abort(400,
|
||||
|
Loading…
x
Reference in New Issue
Block a user