-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin.qmd
80 lines (66 loc) · 4.5 KB
/
admin.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Admin
Guides for admins managing the data catalog.
## Giving User Permissions {.unnumbered}
Users have roles in each organization that give them different permissions.
The roles are:
- __Member__: can see private datasets in the organization
- __Editor__: can add private datasets to the organization and delete datasets from the organization
- __Admin__: can change users' roles in an organization and publish datasets from private to public
To give a user a role in an organization:
1. Click on the __Organizations__ tab at the top of the screen and click on the organization you want to add the user to.
2. Click on the __Manage__ button in the upper right.
3. Click on the __Members__ tab at the top.
![](images/admin/orgmembers.png)
- To add a new member to the organizaton, click the __Add Member__ button. Enter their username, select their new role from the dropdown, and click the __Add Member__ button at the bottom of the form.
![](images/admin/addorgmember.png)
- To change an existing member's role, click the wrench next to their user name.
![](images/admin/editmember.png)
- Select their new role from the dropdown menu and click __Update Member__
- To remove the user from the organization completely, click the __Delete__ button.
![](images/admin/deletemember.png)
## Reviewing and Publishing a Dataset {.unnumbered}
1. Navigate to the dataset you would like to publish.
2. Review the metadata and ensure the files/links are correct and function properly.
3. To publish, click on the __Manage__ button in the top right of the dataset page.
4. In the metadata fields, find the __Visibility__ field.
![](images/admin/publish.png)
5. Change the __Visibility__ field from __Private__ to __Public__, and click the __Update Dataset__ button at the bottom of the form.
## Deleting Datasets/Groups/Organizations {.unnumbered}
1. To delete a dataset, group, or organization, navigate to it's page and click the __Manage__ button in the upper right.
2. Click the __Delete__ button at the bottom of the form to delete.
3. __Deleting a dataset, group, or organization does not remove it from the database.__ After deleting, a sysadmin can restore the item or purge it to remove it from the database. If not purged, the url for the deleted item cannot be reused.
### Purge Deleted Datasets/Groups/Organizations {.unnumbered}
1. Navigate to sysadmin settings by clicking the hammer icon at the top of the page.
![](images/admin/sysadminsettings.png)
2. Click on the __Trash__ tab. This page will list all the currently deleted datasets, groups, and organizations.
![](images/admin/purge.png)
3. You can purge all deleted items using the __Purge all__ button at the top of the form. To purge only one group of items (datasets, group, or organizations) use the __Purge__ button in that section.
### Restore Deleted Datasets {.unnumbered}
1. Navigate to sysadmin settings by clicking the hammer icon at the top of the page.
![](images/admin/sysadminsettings.png)
2. Click on the __Trash__ tab. This page will list all the currently deleted datasets, groups, and organizations.
![](images/admin/purge.png)
3. Click on the dataset you would like to restore, and click the __Manage__ button in the upper right.
4. In the metadata fields find the __State__ field.
![](images/admin/deletedstate.png)
5. Change the __State__ field from __Deleted__ to __Active__, and then click the __Update Dataset__ button at the bottom of the form.
## Restoring a Deleted User {.unnumbered}
When a user is deleted from the website, their information remains in the database with the `state` field set to `deleted`. To reactivate the user, you must set this field to `active` in the database.
1. Enter the `acep-db-cont` docker container
- `docker exec -it acep-db-cont /bin/bash`
2. Access the postgres database
- `psql -U postgres`
3. List all the databases and connect to the ckandb database.
- `\l`
- `\c ckandb`
4. List all the tables and list the columns of the user table.
- `\d`
- `\d user`
5. List all the users in the user table.
- `SELECT * FROM public.user;`
6. Find the deleted user with the username [username].
- `SELECT id, name, email, state FROM public.user WHERE name = ‘[username]’;`
7. Update the user’s state field.
- `UPDATE public.user SET state = ‘active’ WHERE name = ‘[username]’;`
8. Find the user again and ensure that the state field is set to active.
- `SELECT id, name, email, state FROM public.user WHERE name = ‘[username]’;`