From: Eric Bollengier Date: Mon, 12 Nov 2007 20:21:15 +0000 (+0000) Subject: ebl Add user managment for mysql X-Git-Tag: Release-3.0.0~2259 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fb619731094d9d25a65891a0a2266e9d70694f7f;p=bacula%2Fbacula ebl Add user managment for mysql git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5919 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/script/bweb-mysql.sql b/gui/bweb/script/bweb-mysql.sql index bf5954183b..b8e964f3f5 100644 --- a/gui/bweb/script/bweb-mysql.sql +++ b/gui/bweb/script/bweb-mysql.sql @@ -1,3 +1,50 @@ +CREATE TABLE bweb_user +( + userid serial not null, + username text not null, + use_acl boolean default false, + enabled boolean default true, + comment text default '', + passwd text default '', + primary key (userid) +); +CREATE UNIQUE INDEX bweb_user_idx on bweb_user (username(255)); + +CREATE TABLE bweb_role +( + roleid serial not null, + rolename text not null, +-- comment text default '', + primary key (roleid) +); +CREATE UNIQUE INDEX bweb_role_idx on bweb_role (rolename(255)); +INSERT INTO bweb_role (rolename) VALUES ('r_user_mgnt'); +INSERT INTO bweb_role (rolename) VALUES ('r_delete_job'); +INSERT INTO bweb_role (rolename) VALUES ('r_prune'); +INSERT INTO bweb_role (rolename) VALUES ('r_purge'); +INSERT INTO bweb_role (rolename) VALUES ('r_group_mgnt'); +INSERT INTO bweb_role (rolename) VALUES ('r_location_mgnt'); +INSERT INTO bweb_role (rolename) VALUES ('r_cancel_job'); +INSERT INTO bweb_role (rolename) VALUES ('r_run_job'); +INSERT INTO bweb_role (rolename) VALUES ('r_configure'); +INSERT INTO bweb_role (rolename) VALUES ('r_client_status'); +INSERT INTO bweb_role (rolename) VALUES ('r_view_job'); + +CREATE TABLE bweb_role_member +( + roleid integer not null, + userid integer not null, + primary key (roleid, userid) +); + +CREATE TABLE bweb_client_group_acl +( + client_group_id integer not null, + userid integer not null, + primary key (client_group_id, userid) +); + + -- Manage Client groups in bweb -- Works with postgresql and mysql5 diff --git a/gui/bweb/script/bweb-postgresql.sql b/gui/bweb/script/bweb-postgresql.sql index 3170cae449..b77af35714 100644 --- a/gui/bweb/script/bweb-postgresql.sql +++ b/gui/bweb/script/bweb-postgresql.sql @@ -28,6 +28,7 @@ CREATE TABLE bweb_user userid serial not null, username text not null, use_acl boolean default false, + enabled boolean default true, comment text default '', passwd text default '', primary key (userid) diff --git a/gui/bweb/script/upgrade-2.2_3.0_postgresql.sql b/gui/bweb/script/upgrade-2.2_3.0_postgresql.sql index f9eccb752f..ed2a6b560e 100644 --- a/gui/bweb/script/upgrade-2.2_3.0_postgresql.sql +++ b/gui/bweb/script/upgrade-2.2_3.0_postgresql.sql @@ -27,6 +27,7 @@ CREATE TABLE bweb_user userid serial not null, username text not null, use_acl boolean default false, + enabled boolean default true, comment text default '', passwd text default '', primary key (userid)