Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
240a8a9e
Verified
Commit
240a8a9e
authored
2 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-encode
parents
84427f52
1d45e27d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!55
FIX: new systems expect encoded body
Pipeline
#25297
passed
2 years ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
src/caosdb/common/administration.py
+6
-22
6 additions, 22 deletions
src/caosdb/common/administration.py
with
9 additions
and
22 deletions
CHANGELOG.md
+
3
−
0
View file @
240a8a9e
...
...
@@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
password method.
-
`read()`
of MockupResponse returns now an appropriate type on modern systems
*
[
caosdb-server#142
](
https://gitlab.com/caosdb/caosdb-server/-/issues/142
)
Can't create users with dots in their user names
### Security ###
### Documentation ###
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/common/administration.py
+
6
−
22
View file @
240a8a9e
...
...
@@ -196,17 +196,9 @@ def _update_user(name, realm=None, password=None, status=None,
e
.
msg
=
"
You are not permitted to update this user.
"
raise
e
except
HTTPClientError
as
e
:
if
e
.
status
==
409
:
e
.
msg
=
"
Entity does not exist.
"
if
e
.
status
==
422
:
e
.
msg
=
"""
Maybe the password does not match the required standard?
The current requirements are:
- at least 8 characters
- at least 1 number
- at least 1 lower case character
- at least 1 upper case character
- at least 1 special character
"""
for
elem
in
etree
.
fromstring
(
e
.
body
):
if
elem
.
tag
==
"
Error
"
:
e
.
msg
=
elem
.
get
(
"
description
"
)
raise
...
...
@@ -231,17 +223,9 @@ def _insert_user(name, password=None, status=None, email=None, entity=None, **kw
e
.
msg
=
"
You are not permitted to insert a new user.
"
raise
e
except
HTTPClientError
as
e
:
if
e
.
status
==
409
:
e
.
msg
=
"
User name is already in use.
"
if
e
.
status
==
422
:
e
.
msg
=
"""
Maybe the password does not match the required standard?
The current requirements are:
- at least 8 characters
- at least 1 number
- at least 1 lower case character
- at least 1 upper case character
- at least 1 special character
"""
for
elem
in
etree
.
fromstring
(
e
.
body
):
if
elem
.
tag
==
"
Error
"
:
e
.
msg
=
elem
.
get
(
"
description
"
)
raise
e
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment