-- JS 1.6 standard permissions
INSERT INTO TURBINE_PERMISSION VALUES(1,'view',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(2,'customize',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(3,'maximize',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(4,'minimize',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(5,'personalize',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(6,'info',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(7,'close',NULL);
INSERT INTO TURBINE_PERMISSION VALUES(8,'detach',NULL);

ALTER SEQUENCE TURBINE_PERMISSION_SEQ RESTART WITH 11;

-- JS 1.6 standard roles
INSERT INTO TURBINE_ROLE VALUES(1,'user',NULL);
INSERT INTO TURBINE_ROLE VALUES(2,'admin',NULL);
INSERT INTO TURBINE_ROLE VALUES(3,'guest',NULL);

-- Tibesti roles, starting from #11 because sequences (ID_TABLE) start at 10
INSERT INTO TURBINE_ROLE VALUES(11,'planning',NULL);
INSERT INTO TURBINE_ROLE VALUES(12,'Erfasser',NULL);
INSERT INTO TURBINE_ROLE VALUES(13,'Redakteur',NULL);
INSERT INTO TURBINE_ROLE VALUES(14,'Fachadministrator',NULL);
INSERT INTO TURBINE_ROLE VALUES(15,'Chefredakteur',NULL);

ALTER SEQUENCE TURBINE_ROLE_SEQ RESTART WITH 16;

-- JS 1.6 standard groups
INSERT INTO TURBINE_GROUP VALUES(1,'Jetspeed',NULL);
INSERT INTO TURBINE_GROUP VALUES(2,'apache',NULL);

ALTER SEQUENCE TURBINE_GROUP_SEQ RESTART WITH 11;

-- JS 1.6 standard users without turbine
INSERT INTO TURBINE_USER VALUES(1,'admin','jetspeed','Portal','Admin','admin@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
--INSERT INTO TURBINE_USER VALUES(2,'turbine','turbine','David','Turbine','taylor@apache.org','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(3,'anon','anon','Anonymous','User','anon@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);

-- Tibesti Users
INSERT INTO TURBINE_USER VALUES(11,'guest','guest','Miss','Guest','guest@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(12,'Aachen','aachen','Karl','der Grosse','aachen@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(13,'Potsdam','potsdam','Friedrich','der Grosse','potsdam@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(14,'Bonn','bonn','Ludwig','van Beethoven','bonn@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(15,'Limburg','limburg','Mister','Limburg','limburg@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(16,'fachadmin','fachadmin','Miss','Fachadmin','anon@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(17,'plannen','plannen','Mister','Plannen','plannen@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(18,'bouwen','bouwen','Miss','Bouwen','bouwen@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
INSERT INTO TURBINE_USER VALUES(19,'Ol','ol','Julius','Mosen','oldenburg@localhost','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
ALTER SEQUENCE TURBINE_USER_SEQ RESTART WITH 20;

-- JS 1.6 standard
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,1);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,2);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,3);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,4);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,5);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,6);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,1);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,2);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,3);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,4);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,5);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,6);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(2,7);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(3,1);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(3,6);

-- Role planning
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(11,1);
INSERT INTO TURBINE_ROLE_PERMISSION VALUES(11,6);
-- Role Erfasser, Fachadministrator, Redakteur have no permissions

-- JS 1.6 standard
--INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(2,1,1);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(1,1,1);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(1,1,2);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(3,1,3);

-- Tibesti roles
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(11,1,3);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(12,1,12);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(13,1,12);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(14,1,13);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(15,1,13);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(16,1,14);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(17,1,11);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(18,1,11);
INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(19,1,15);

-- JS 1.6. standard
INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',100,10);
INSERT INTO ID_TABLE VALUES(2,'TURBINE_ROLE',120,10);
INSERT INTO ID_TABLE VALUES(3,'TURBINE_GROUP',100,10);
INSERT INTO ID_TABLE VALUES(4,'TURBINE_USER',120,10);
INSERT INTO ID_TABLE VALUES(5,'TURBINE_SCHEDULED_JOB',100,10);
INSERT INTO ID_TABLE VALUES(6,'TURBINE_ROLE_PERMISSION',100,10);
INSERT INTO ID_TABLE VALUES(7,'TURBINE_USER_GROUP_ROLE',100,10);
INSERT INTO ID_TABLE VALUES(8,'JETSPEED_USER_PROFILE',120,10);
INSERT INTO ID_TABLE VALUES(9,'JETSPEED_GROUP_PROFILE',120,10);
INSERT INTO ID_TABLE VALUES(10,'JETSPEED_ROLE_PROFILE',120,10);
INSERT INTO ID_TABLE VALUES(11,'JETSPEED_ANON_PROFILE',120,10);


