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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
8811d5d4
Commit
8811d5d4
authored
Nov 24, 2020
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
ENH: allow setting the REALM of a user in admin tools for password changes
parent
1ce56524
No related branches found
No related tags found
3 merge requests
!159
Release 0.16.o
,
!147
ENH: set user realm when chaning passwords
,
!146
F user realm
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosdb/utils/caosdb_admin.py
+14
-1
14 additions, 1 deletion
src/caosdb/utils/caosdb_admin.py
with
14 additions
and
1 deletion
src/caosdb/utils/caosdb_admin.py
+
14
−
1
View file @
8811d5d4
...
@@ -42,6 +42,13 @@ __updated__ = '2018-12-11'
...
@@ -42,6 +42,13 @@ __updated__ = '2018-12-11'
def
do_update_role
(
args
):
def
do_update_role
(
args
):
"""
Update the description of a role.
Allowed keyword arguments:
role_name: Name of the role to update
role_description: New description of the role
"""
admin
.
_update_role
(
name
=
args
.
role_name
,
description
=
args
.
role_description
)
admin
.
_update_role
(
name
=
args
.
role_name
,
description
=
args
.
role_description
)
...
@@ -137,7 +144,7 @@ def do_deactivate_user(args):
...
@@ -137,7 +144,7 @@ def do_deactivate_user(args):
def
do_set_user_password
(
args
):
def
do_set_user_password
(
args
):
password
=
_promt_for_pw
()
password
=
_promt_for_pw
()
admin
.
_update_user
(
name
=
args
.
user_name
,
password
=
password
)
admin
.
_update_user
(
name
=
args
.
user_name
,
password
=
password
,
realm
=
args
.
realm
)
def
do_add_user_roles
(
args
):
def
do_add_user_roles
(
args
):
...
@@ -337,6 +344,12 @@ USAGE
...
@@ -337,6 +344,12 @@ USAGE
metavar
=
'
USERNAME
'
,
metavar
=
'
USERNAME
'
,
dest
=
"
user_name
"
,
dest
=
"
user_name
"
,
help
=
"
The name of the user who
'
s password is to be set.
"
)
help
=
"
The name of the user who
'
s password is to be set.
"
)
subparser
.
add_argument
(
metavar
=
'
REALM
'
,
dest
=
"
realm
"
,
nargs
=
"
?
"
,
default
=
None
,
help
=
"
The realm of the user who
'
s password is to be set.
"
)
subparser
=
subparsers
.
add_parser
(
subparser
=
subparsers
.
add_parser
(
"
set_user_entity
"
,
"
set_user_entity
"
,
...
...
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