Revision 3fd38bfe
Added by Katja Luther over 12 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/permissions/PermissionsUpdater.java | ||
---|---|---|
38 | 38 |
|
39 | 39 |
//insert granted authorities |
40 | 40 |
|
41 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (1,'889f9961-8d0f-41a9-95ec-59905b3941bf', 'USER.Edit')";
|
|
41 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (1,'889f9961-8d0f-41a9-95ec-59905b3941bf', 'USER.EDIT')";
|
|
42 | 42 |
datasource.executeUpdate(sql); |
43 | 43 |
|
44 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (2,'841a1711-20f1-4209-82df-7944ad2050da', 'USER.Create')";
|
|
44 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (2,'841a1711-20f1-4209-82df-7944ad2050da', 'USER.CREATE')";
|
|
45 | 45 |
datasource.executeUpdate(sql); |
46 | 46 |
|
47 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (3,'bb9e2547-1e28-45fd-8c35-d1ceffbfcb36', 'USER.Delete')";
|
|
47 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (3,'bb9e2547-1e28-45fd-8c35-d1ceffbfcb36', 'USER.DELETE')";
|
|
48 | 48 |
datasource.executeUpdate(sql); |
49 | 49 |
|
50 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (4,'8a61c102-4643-4e81-a3b6-c40d60d2ba99', 'USER.Admin')"; |
|
50 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (4,'8a61c102-4643-4e81-a3b6-c40d60d2ba99', 'USER.ADMIN')"; |
|
51 |
datasource.executeUpdate(sql); |
|
52 |
|
|
53 |
sql = "INSERT INTO grantedauthorityimpl (id,uuid, authority) VALUES (5,'216a56bf-cd1a-43ff-9cb1-039c823c38af', 'ALL.ADMIN')"; |
|
51 | 54 |
datasource.executeUpdate(sql); |
52 | 55 |
|
53 | 56 |
//insert useraccount_grantedauthority for user admin |
54 | 57 |
|
55 |
sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE 'admin'), 4)"; |
|
58 |
/*sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE 'admin'), 4)";
|
|
56 | 59 |
datasource.executeUpdate(sql); |
57 | 60 |
|
58 | 61 |
sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE 'admin'), 3)"; |
... | ... | |
63 | 66 |
|
64 | 67 |
sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE 'admin'), 1)"; |
65 | 68 |
datasource.executeUpdate(sql); |
69 |
*/ |
|
70 |
sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE 'admin'), 5)"; |
|
71 |
datasource.executeUpdate(sql); |
|
72 |
|
|
66 | 73 |
return null; |
67 | 74 |
} |
68 | 75 |
|
Also available in: Unified diff
security-updater: add the role of an overall admin