Differences From
Artifact [6d12737279]:
1 1 \prompt 'domain name: ' domain
2 +\prompt 'instance name: ' inst
2 3 \prompt 'bind to socket: ' bind
3 4 \qecho 'by default, parsav tracks rights on its own. you can override this later by replacing the rights table with a view, but you''ll then need to set appropriate rules on the view to allow administrators to modify rights from the web UI, or set the rights-readonly flag in the config table to true. for now, enter the name of an actor who will be granted full rights when she logs in.'
4 5 \prompt 'admin actor: ' admin
5 -\qecho 'you will need to create an authentication view mapping your user database to something parsav can understand; see auth.sql for an example. enter the name of the view to use.'
6 -\prompt 'auth view: ' auth
6 +\qecho 'you will need to create an authentication view named parsav_auth mapping your user database to something parsav can understand; see auth.sql for an example.'
7 7
8 8 begin;
9 9
10 10 drop table if exists parsav_config;
11 11 create table if not exists parsav_config (
12 12 key text primary key,
13 13 value text
14 14 );
15 15
16 16 insert into parsav_config (key,value) values
17 17 ('bind',:'bind'),
18 18 ('domain',:'domain'),
19 - ('auth-source',:'auth'),
19 + ('instance-name',:'inst'),
20 20 ('administrator',:'admin'),
21 21 ('server-secret', encode(
22 22 digest(int8send((2^63 * (random()*2 - 1))::bigint),
23 23 'sha512'), 'base64'));
24 24
25 25 -- note that valid ids should always > 0, as 0 is reserved for null
26 26 -- on the client side, vastly simplifying code