and add in toolbar related permissions, plus a missing and unrelated perm: IMPORT_AUTHORITY_MARC
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
usr INT REFERENCES actor.usr (id) ON DELETE CASCADE,
label TEXT NOT NULL,
layout TEXT NOT NULL,
- CONSTRAINT label_once_per_ws UNIQUE (ws, label) WHERE ws IS NOT NULL,
- CONSTRAINT label_once_per_org UNIQUE (org, label) WHERE org IS NOT NULL,
- CONSTRAINT label_once_per_usr UNIQUE (usr, label) WHERE usr IS NOT NULL,
CONSTRAINT only_one_type CHECK (
(ws IS NOT NULL AND COALESCE(org,usr) IS NULL) OR
(org IS NOT NULL AND COALESCE(ws,usr) IS NULL) OR
),
CONSTRAINT layout_must_be_json CHECK ( is_json(layout) )
);
+CREATE UNIQUE INDEX label_once_per_ws ON actor.toolbar (ws, label) WHERE ws IS NOT NULL;
+CREATE UNIQUE INDEX label_once_per_org ON actor.toolbar (org, label) WHERE org IS NOT NULL;
+CREATE UNIQUE INDEX label_once_per_usr ON actor.toolbar (usr, label) WHERE usr IS NOT NULL;
COMMIT;
( 521, 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD', oils_i18n_gettext( 521,
'Allows a user to create new bibs directly from an ACQ MARC file upload', 'ppl', 'description' )),
( 522, 'IMPORT_AUTHORITY_MARC', oils_i18n_gettext( 522,
- 'Allows a user to create new authority records', 'ppl', 'description' ));
-
+ 'Allows a user to create new authority records', 'ppl', 'description' )),
+ ( 523, 'VIEW_TOOLBAR', oils_i18n_gettext( 523,
+ 'Allows a user to view and use custom toolbars', 'ppl', 'description' )),
+ ( 524, 'ADMIN_TOOLBAR', oils_i18n_gettext( 524,
+ 'Allows a user to create, edit, and delete custom toolbars', 'ppl', 'description' ));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
'VIEW_CIRCULATIONS',
'VIEW_ORG_SETTINGS',
'VIEW_PERMIT_CHECKOUT',
+ 'VIEW_TOOLBAR',
'VIEW_USER',
'VIEW_USER_FINES_SUMMARY',
'VIEW_USER_TRANSACTIONS');
'RENEW_HOLD_OVERRIDE',
'UPDATE_COPY',
'UPDATE_VOLUME',
+ 'ADMIN_TOOLBAR',
'VOLUME_HOLDS');
usr INT REFERENCES actor.usr (id) ON DELETE CASCADE,
label TEXT NOT NULL,
layout TEXT NOT NULL,
- CONSTRAINT label_once_per_ws UNIQUE (ws, label) WHERE ws IS NOT NULL,
- CONSTRAINT label_once_per_org UNIQUE (org, label) WHERE org IS NOT NULL,
- CONSTRAINT label_once_per_usr UNIQUE (usr, label) WHERE usr IS NOT NULL,
CONSTRAINT only_one_type CHECK (
(ws IS NOT NULL AND COALESCE(org,usr) IS NULL) OR
(org IS NOT NULL AND COALESCE(ws,usr) IS NULL) OR
),
CONSTRAINT layout_must_be_json CHECK ( is_json(layout) )
);
+CREATE UNIQUE INDEX label_once_per_ws ON actor.toolbar (ws, label) WHERE ws IS NOT NULL;
+CREATE UNIQUE INDEX label_once_per_org ON actor.toolbar (org, label) WHERE org IS NOT NULL;
+CREATE UNIQUE INDEX label_once_per_usr ON actor.toolbar (usr, label) WHERE usr IS NOT NULL;
+INSERT INTO permission.perm_list ( id, code, description ) VALUES
+ ( 522, 'IMPORT_AUTHORITY_MARC', oils_i18n_gettext( 522,
+ 'Allows a user to create new authority records', 'ppl', 'description' )), -- this one was missing
+ ( 523, 'VIEW_TOOLBAR', oils_i18n_gettext( 523,
+ 'Allows a user to view and use custom toolbars', 'ppl', 'description' )),
+ ( 524, 'ADMIN_TOOLBAR', oils_i18n_gettext( 524,
+ 'Allows a user to create, edit, and delete custom toolbars', 'ppl', 'description' ));