Skip to content

Commit 0792f2c

Browse files
authored
Merge pull request #17 from robkooper/no-fail-user-exist
exit with code 0
2 parents 591bc0e + 24d832a commit 0792f2c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
[#8](https://github.com/clowder-framework/clowder/issues/8)
1515
- Datasets layout on space page would sometimes have overlapping tiles.
1616

17+
### Changed
18+
- mongo-init script with users would return with exit code -1 if user exists, now returns exit code 0.
19+
1720
## 1.9.0 - 2020-06-01
21+
1822
**_Warning:_ This update modifies information stored in Elasticsearch used for text based searching. To take advantage
1923
of these changes a reindex of Elasticsearch is required. A reindex can be started by an admin from the Admin menu.**
2024

scripts/mongo-init/mongo-init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# check if user already exists
6363
if users.find_one({"identityId.userId": user_name, "identityId.providerId": "userpass"}):
6464
print("USER ALREADY EXISTS, will not create user")
65-
sys.exit(-1)
65+
sys.exit(0)
6666

6767
# generate password if not specified
6868
encrypted_password = "$2a" + bcrypt.hash(user_password, rounds=10)[3:]

0 commit comments

Comments
 (0)