]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/User.java
UPD: assurance type goes Enum, (+clean)
[gigi.git] / src / org / cacert / gigi / dbObjects / User.java
index 6de799aeacb4e7a5461e1482b112ebf3bff59643..b67da929b79ced837ada340b3fa1275f595c964c 100644 (file)
@@ -112,10 +112,6 @@ public class User implements IdCachable {
         this.email = email;
     }
 
-    public void setId(int id) {
-        this.id = id;
-    }
-
     public void setFname(String fname) {
         this.name.fname = fname;
     }
@@ -490,7 +486,7 @@ public class User implements IdCachable {
         return Collections.unmodifiableSet(groups);
     }
 
-    public void grantGroup(User granter, Group toGrant) throws GigiApiException {
+    public void grantGroup(User granter, Group toGrant) {
         groups.add(toGrant);
         GigiPreparedStatement ps = DatabaseConnection.getInstance().prepare("INSERT INTO user_groups SET user=?, permission=?, grantedby=?");
         ps.setInt(1, getId());
@@ -499,7 +495,7 @@ public class User implements IdCachable {
         ps.execute();
     }
 
-    public void revokeGroup(User revoker, Group toRevoke) throws GigiApiException {
+    public void revokeGroup(User revoker, Group toRevoke) {
         groups.remove(toRevoke);
         GigiPreparedStatement ps = DatabaseConnection.getInstance().prepare("UPDATE user_groups SET deleted=CURRENT_TIMESTAMP, revokedby=? WHERE deleted is NULL AND permission=? AND user=?");
         ps.setInt(1, revoker.getId());