Commit 7b1d19e16437a9ef5ed5fc93e9bfe1ac8fa2be54

Authored by Thomas Ziemer
1 parent 63a5939b

feature: Weiteren Benutzer hinzugefügt

src/main/java/net/ziemers/swxercise/lg/user/enums/RightState.java
... ... @@ -24,6 +24,7 @@ public enum RightState {
24 24 NOT_LOGGED_IN(Constants.NOT_LOGGED_IN),
25 25 LOGGED_IN(Constants.LOGGED_IN),
26 26 ADMIN(Constants.ADMIN),
  27 + USER(Constants.USER),
27 28 ;
28 29  
29 30 private String name;
... ... @@ -61,6 +62,7 @@ public enum RightState {
61 62 public static final String NOT_LOGGED_IN = "NOT_LOGGED_IN";
62 63 public static final String LOGGED_IN = "LOGGED_IN";
63 64 public static final String ADMIN = "ADMIN";
  65 + public static final String USER = "USER";
64 66 }
65 67  
66 68 }
... ...
src/main/resources/bootstrap_data.sql
1 1 INSERT INTO Role (id, name) VALUES(1, "Adminrolle");
2 2 INSERT INTO Role_rights (Role_id, rights) VALUES(1, "ADMIN");
3   -INSERT INTO Profile (id, role_id, username, hashAlgorithm, passwordHash, salt) VALUES (2, 1, "admin", "SHA512", "JeuPx1++vnOSp/rdDwjnPwNIldN49UhtJEwUcKr3ksTvu/3s6nmnWbh+mkjfsw41w1LE8VJJAukn+LpfnUybzg==", "wwUVuetAfN1dtaXk0zWOMmb1nIw=");
  3 +INSERT INTO Profile (id, role_id, username, mailaddress, hashAlgorithm, passwordHash, salt) VALUES (2, 1, "admin", "chuck.norris@haudrauf.com", "SHA512", "JeuPx1++vnOSp/rdDwjnPwNIldN49UhtJEwUcKr3ksTvu/3s6nmnWbh+mkjfsw41w1LE8VJJAukn+LpfnUybzg==", "wwUVuetAfN1dtaXk0zWOMmb1nIw=");
4 4 INSERT INTO User (id, profile_id, firstname, lastname) VALUES (3, 2, "Chuck", "Norris");
5   -UPDATE hibernate_sequence SET next_val = 4;
  5 +
  6 +INSERT INTO Role (id, name) VALUES(4, "Benutzerrolle");
  7 +INSERT INTO Role_rights (Role_id, rights) VALUES(4, "USER");
  8 +INSERT INTO Profile (id, role_id, username, mailaddress, hashAlgorithm, passwordHash, salt) VALUES (5, 4, "user", "hein.bloed@machsgut.de", "SHA512", "iXFejEGFcJJ50cQKEZNUqHtZc50eXyyJgU6iB2SsDRVAWhNltuT+r3VIJuqsk++Zd49X3LSOpAbxnDMF7Olgrg==", "FrG5XPKM89c1e5DXH+z1VnS/1OE=");
  9 +INSERT INTO User (id, profile_id, firstname, lastname) VALUES (6, 5, "Hein", "Blöd");
  10 +
  11 +UPDATE hibernate_sequence SET next_val = 7;
... ...