From 66eeb6a273b1a60813375a4bf55bcc38e1a3d00a Mon Sep 17 00:00:00 2001
From: Shireesh Anjal <shireesh@gluster.com>
Date: Wed, 25 May 2011 18:12:48 +0530
Subject: Design changes - introducing cluster-server mapping on gateway

---
 .../scripts/1.0.0/2-users-authorities-groups.sql    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 src/com.gluster.storage.management.server/WebContent/data/scripts/1.0.0/2-users-authorities-groups.sql

(limited to 'src/com.gluster.storage.management.server/WebContent/data/scripts/1.0.0/2-users-authorities-groups.sql')

diff --git a/src/com.gluster.storage.management.server/WebContent/data/scripts/1.0.0/2-users-authorities-groups.sql b/src/com.gluster.storage.management.server/WebContent/data/scripts/1.0.0/2-users-authorities-groups.sql
new file mode 100644
index 00000000..35ccf965
--- /dev/null
+++ b/src/com.gluster.storage.management.server/WebContent/data/scripts/1.0.0/2-users-authorities-groups.sql
@@ -0,0 +1,21 @@
+-- Create users
+insert into users(username, password, enabled) values ('gluster','gluster',1);
+insert into users(username, password, enabled) values ('guest','guest',1);
+
+-- Assign authorities to users (to be removed after implementing user group functionality)
+insert into authorities(username,authority) values ('gluster','ROLE_USER');
+insert into authorities(username,authority) values ('gluster','ROLE_ADMIN');
+insert into authorities(username,authority) values ('guest','ROLE_USER');
+
+-- Create user groups
+insert into groups(group_name) values ('Users');
+insert into groups(group_name) values ('Administrators');
+
+-- Add authorities to groups (functionality not yet implemented in code)
+insert into group_authorities(group_id, authority) select id,'ROLE_USER' from groups where group_name='Users';
+insert into group_authorities(group_id, authority) select id,'ROLE_USER' from groups where group_name='Administrators'; 
+insert into group_authorities(group_id, authority) select id,'ROLE_ADMIN' from groups where group_name='Administrators';
+
+-- Assign group members
+insert into group_members(group_id, username) select id,'guest' from groups where group_name='Users';
+insert into group_members(group_id, username) select id,'gluster' from groups where group_name='Administrators';
\ No newline at end of file
-- 
cgit 

