Skip to content
Snippets Groups Projects

MAINT: LinkAhead rename

Closed Henrik tom Wörden requested to merge f-linkahead-rename into dev
19 files
+ 81
81
Compare changes
  • Side-by-side
  • Inline
Files
19
@@ -18,7 +18,7 @@ In the following, you'll learn how to
Prerequisites
-------------
This example needs some preparations regarding your CaosDB setup that have to
This example needs some preparations regarding your LinkAhead setup that have to
(or, for the sake of simplicity, should) be done outside the actual Python
example script.
@@ -26,27 +26,27 @@ The curator role
~~~~~~~~~~~~~~~~
First, a ``curator`` role is created with a meaningful description. We'll use
``caosdb_admin.py`` for this which leads to the following command:
``linkahead_admin.py`` for this which leads to the following command:
.. code:: console
$ caosdb_admin.py create_role "curator" "A user who is permitted to create new Records, Properties, and RecordTypes but who is not allowed to change the core data model."
$ linkahead_admin.py create_role "curator" "A user who is permitted to create new Records, Properties, and RecordTypes but who is not allowed to change the core data model."
To actually see how this role's permissions change, we also need a user with
this role. Assume you already have created and activated (see
:doc:`Administration <../administration>`) a ``test_curator`` user, then
``caosdb_admin.py`` is used again to assign it the correct role:
``linkahead_admin.py`` is used again to assign it the correct role:
.. code:: console
$ caosdb_admin.py add_user_roles test_curator curator
$ linkahead_admin.py add_user_roles test_curator curator
.. note::
The ``test_curator`` user shouldn't have administration privileges, otherwise
the below changes won't have any effect.
The core data model and caosdb-advanced-user-tools
The core data model and linkahead-advanced-user-tools
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In principle, the following script works with any data model defined in a json
@@ -61,8 +61,8 @@ Clone the schemata into the same directory containing the below script via
$ git clone https://github.com/leibniz-zmt/zmt-metadata-schema.git
Furthermore, we'll need the `CaosDB Advanced User Tools
<https://gitlab.com/caosdb/caosdb-advanced-user-tools>`_ for loading the
Furthermore, we'll need the `LinkAhead Advanced User Tools
<https://gitlab.com/linkahead/linkahead-advanced-user-tools>`_ for loading the
metadata schemata from the json files, so install them via
.. code:: console
@@ -76,7 +76,7 @@ Users with the ``curator`` role should be able to have any permission for all
entities by default. The exceptions for the core data model entities will be set
with the script below. These default settings are best done via the
``global_entities_permissions.xml`` config file (see the `server documentation
<https://docs.indiscale.com/caosdb-server/permissions.html#how-to-set-permissions>`_). Simply
<https://docs.linkahead.org/linkahead-server/permissions.html#how-to-set-permissions>`_). Simply
add the following line to the file
.. code:: xml
@@ -89,7 +89,7 @@ beginning) **with priority**. This ensures, that no normal user is allowed to
overrule these permissions (since it is granted with priority), but it can still
be denied for the core data model entities by a **deny** rule with priority. See
the server documentation on `permission
calculation <https://docs.indiscale.com/caosdb-server/permissions.html#permission-calculation>`_
calculation <https://docs.linkahead.org/linkahead-server/permissions.html#permission-calculation>`_
for more information on which permission rules can or can't be overruled.
Your complete ``global_entities_permissions.xml`` might then look like
@@ -109,13 +109,13 @@ Your complete ``global_entities_permissions.xml`` might then look like
.. note::
Note that you have to restart your CaosDB server after modifying the
Note that you have to restart your LinkAhead server after modifying the
``global_entities_permissions.xml``.
The code
--------
After having applied all of the above prerequisites and restarting your CaosDB
After having applied all of the above prerequisites and restarting your LinkAhead
server, execute the following code.
:download:`Download full code<curator_permissions.py>`
Loading