Skip to content

Commit fab17ed

Browse files
jrcastro2kpsherva
authored andcommitted
administration: explain new permissions configuration
* closes CERNDocumentServer/cds-rdm#680
1 parent b18f881 commit fab17ed

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

docs/operate/customize/restrict_access.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ While most features in InvenioRDM are guarded by configurable permission policie
1111
For these exceptions, as well as extra precautions generally, it can be beneficial to restrict access on an `nginx` level.
1212

1313
!!! info "Current exceptions"
14-
At the time of writing, one of these exceptions is the administration panel which has a hard-coded check for the `administration-access` action.
14+
At the time of writing, one of these exceptions is the administration panel. Access to the panel entry point is controlled by the `admin-view` action, and access to individual admin views by the `administration-access` action. See [Administration access control](../../use/administration.md#access-control) for details on granting these actions to roles.
1515

1616
An access restriction based on the client's IP address can be put into place via the `nginx` configuration, e.g. by adding nested `location` directives in the existing configuration:
1717

docs/use/administration.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,48 @@
33
The administration panel is a feature in InvenioRDM introduced in v10 that provides a graphical user interface for managing your instance. It is designed to be used by administrators and superusers of the repository.
44
For more technical details you can read the [developer guide to the InvenioRDM administration panel](../maintenance/internals/administration_panel.md), detailing its programmatic interface and usage.
55

6+
## Access control
7+
8+
Access to the administration panel is controlled by two Invenio actions:
9+
10+
| Action | Controls |
11+
|--------|----------|
12+
| `admin-view` | Visibility of the **"Administration"** link in the user menu and access to the dashboard |
13+
| `administration-access` | Access to **individual admin views** (records, users, OAI-PMH sets, etc.) |
14+
15+
### Granting full administrator access
16+
17+
To give a role full access to the administration panel and all its views, grant both actions:
18+
19+
```shell
20+
invenio roles create administration
21+
invenio access allow admin-view role administration
22+
invenio access allow administration-access role administration
23+
```
24+
25+
Then assign the role to a user:
26+
27+
```shell
28+
invenio roles add <email> administration
29+
```
30+
31+
### Granting access to specific views only
32+
33+
You can grant a role access to the administration panel entry point without giving it access to all admin views. This is useful for roles that only need access to certain sections (e.g. a curator role that only manages specific resources):
34+
35+
```shell
36+
invenio roles create curator
37+
invenio access allow admin-view role curator
38+
```
39+
40+
Individual admin views can then be restricted to specific roles by overriding the `permission` attribute on the view class. See the [developer guide](../maintenance/internals/administration_panel.md) for details.
41+
42+
!!! info
43+
44+
See [Create and assign roles](../operate/customize/users.md#create-and-assign-roles) for more information on managing user roles.
45+
46+
---
47+
648
**As an administrator** you can access the administration panel at `/administration`. This is also available through the user menu in the top right corner of your instance:
749

850
![User Menu Admin](./imgs/banners/user_menu_admin.png)

0 commit comments

Comments
 (0)