summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsoohwa <none@none.none>2017-10-07 08:33:28 +0900
committersoohwa <none@none.none>2017-10-07 08:33:28 +0900
commitb9be17360f5fc7799cc720d40e2e52ee07d3cd38 (patch)
tree215486ac692c70fbab96cb2a0ea839a2c4d9e0a6
parent8daa5b4848cd929d298ca2dfb2170a6b8dab60df (diff)
downloadwekan-b9be17360f5fc7799cc720d40e2e52ee07d3cd38.tar.gz
wekan-b9be17360f5fc7799cc720d40e2e52ee07d3cd38.tar.bz2
wekan-b9be17360f5fc7799cc720d40e2e52ee07d3cd38.zip
Add comment
-rw-r--r--models/users.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/users.js b/models/users.js
index 459462e3..6b835d41 100644
--- a/models/users.js
+++ b/models/users.js
@@ -535,6 +535,12 @@ if (Meteor.isServer) {
Users.after.insert((userId, doc) => {
if (doc.createdThroughApi) {
+ // The admin user should be able to create a user despite disabling registration because
+ // it is two different things (registration and creation).
+ // So, when a new user is created via the api (only admin user can do that) one must avoid
+ // the disableRegistration check.
+ // Issue : https://github.com/wekan/wekan/issues/1232
+ // PR : https://github.com/wekan/wekan/pull/1251
Users.update(doc._id, { $set: { createdThroughApi: '' } });
return;
}