From 0d12b25f91cfcbb09687d774389d85b8c8ffa249 Mon Sep 17 00:00:00 2001
From: Shireesh Anjal <shireesh@gluster.com>
Date: Mon, 1 Aug 2011 11:54:01 +0530
Subject: Renamed project and package com.gluster.storage.management.server to
 com.gluster.storage.management.gateway

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

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

diff --git a/src/com.gluster.storage.management.gateway/WebContent/data/scripts/1.0.0/2-users-authorities-groups.sql b/src/com.gluster.storage.management.gateway/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.gateway/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 

