File tree 3 files changed +26
-5
lines changed
3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -53,4 +53,4 @@ to delete the volumes (this will reset your instance).
53
53
54
54
1 . run the script ` DELA_REPLICAS=... init_dela.sh ` to initialize the DELA network with ` DELA_REPLICAS set to the same value as in .env `
55
55
2 . run ` docker exec -it d-voting-backend-1 /bin/bash ` to connect to the backend
56
- 3 . execute ` node -e 'require("./dbUtils"). addAdmin("./dvoting-users", < sciper>)' ` with your Sciper to add yourself as admin
56
+ 3 . execute ` npx cli addAdmin -- sciper 123455 ` with your SCIPER to add yourself as admin
Original file line number Diff line number Diff line change @@ -25,12 +25,10 @@ and be sure to *export* variables in `config.env` (i.e do `export xx=yy`).
25
25
However it is recommended to use a service manager such as systemd to run the
26
26
app.
27
27
28
- 4 ) Use dbUtils.js
29
-
30
- You can manually update the rights with ` dbUtils.js ` :
28
+ 4 ) Use the CLI to set yourself up as an admin
31
29
32
30
``` sh
33
- NODE_PATH=./node_modules node -e ' require("./dbUtils").listEls("../data/dvoting-users") '
31
+ npx cli addAdmin --sciper 1234
34
32
```
35
33
36
34
# Run the web frontend
Original file line number Diff line number Diff line change @@ -25,3 +25,26 @@ func GenerateKey() {
25
25
# Run the program
26
26
27
27
Once all the previous steps done, the project can be run using ` npm start `
28
+
29
+ # CLI
30
+
31
+ To control the administration right of different users, the CLI tool can be used.
32
+ For example,
33
+ ``` sh
34
+ $ npx cli addAdmin --sciper MY_SCIPER_NUMBER
35
+ ```
36
+
37
+ You can also consult the following command for more information
38
+ ``` sh
39
+ $ npx cli help
40
+ Usage: cli [options] [command]
41
+
42
+ Options:
43
+ -h, --help display help for command
44
+
45
+ Commands:
46
+ addAdmin [options] Given a SCIPER number, the owner would gain full admin permissions
47
+ listUserPermissions [options] Lists the permissions -if any- of the owner of a given SCIPER
48
+ removeAdmin [options] Given a SCIPER number, the owner would lose all admin privileges -if any-
49
+ help [command] display help for command
50
+ ```
You can’t perform that action at this time.
0 commit comments