Skip to content
Snippets Groups Projects
Commit b90b1766 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'dev' into f-exception-handling

parents c0540db9 20011d01
Branches
Tags
No related merge requests found
......@@ -141,20 +141,20 @@ def do_set_user_password(args):
def do_add_user_roles(args):
roles = admin._get_roles(user=args.user_name, realm=None)
roles = admin._get_roles(username=args.user_name, realm=None)
for r in args.user_roles:
roles.add(r)
admin._set_roles(user=args.user_name, roles=roles)
admin._set_roles(username=args.user_name, roles=roles)
def do_remove_user_roles(args):
roles = admin._get_roles(user=args.user_name, realm=None)
roles = admin._get_roles(username=args.user_name, realm=None)
for r in args.user_roles:
if r in roles:
roles.remove(r)
admin._set_roles(user=args.user_name, roles=roles)
admin._set_roles(username=args.user_name, roles=roles)
def do_set_user_entity(args):
......@@ -178,7 +178,7 @@ def do_delete_user(args):
def do_retrieve_user_roles(args):
print(admin._get_roles(user=args.user_name))
print(admin._get_roles(username=args.user_name))
def do_retrieve_role_permissions(args):
......
Administration
==============
The Python script ``caosdb_admin.py`` should be used for administrative tasks.
Call ``python3 caosdb_admin.py --help`` to see how to use it.
The most common task is to create a new user (in the CaosDB realm) and set a
password for the user (note that a user typically needs to be activated)::
python3 caosdb_admin.py create_user anna
python3 caosdb_admin.py set_user_password anna
python3 caosdb_admin.py add_user_roles anna administration
python3 caosdb_admin.py activate_user anna
......@@ -10,7 +10,8 @@ Welcome to PyCaosDB's documentation!
Getting started <README_SETUP>
tutorials/index
Concepts <concepts>
Configuration <configuration>
Configuration <configuration>
Administration <administration>
API documentation<_apidoc/modules>
This is the documentation for the Python client library for CaosDB, ``PyCaosDB``.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment