Permission handling removed
authorMichael <Michael@Michael-LT.bfh.ch>
Wed, 25 Nov 2015 09:51:49 +0000 (10:51 +0100)
committerMichael <Michael@Michael-LT.bfh.ch>
Wed, 25 Nov 2015 09:51:49 +0000 (10:51 +0100)
src/main/java/ch/bfh/ti/srs/dataschema/Permissions.java [deleted file]
src/main/java/ch/bfh/ti/srs/dataschema/User.java

diff --git a/src/main/java/ch/bfh/ti/srs/dataschema/Permissions.java b/src/main/java/ch/bfh/ti/srs/dataschema/Permissions.java
deleted file mode 100644 (file)
index 5d6b887..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*\r
- * Copyright (c) 2015 Berner Fachhochschule, Switzerland.\r
- *\r
- * Project Smart Reservation System.\r
- *\r
- * Distributable under GPL license. See terms of license at gnu.org.\r
- */\r
-package ch.bfh.ti.srs.dataschema;\r
-\r
-public enum Permissions {\r
-       ResourceAdd,\r
-       ResourceEdit,\r
-       ResourceDelete,\r
-       UserAdd,\r
-       UserEdit,\r
-       UserDelete\r
-}\r
index 859938f..fc75482 100644 (file)
@@ -18,7 +18,6 @@ public class User implements Cloneable{
        private String mail;
        private String name;
        private String lastname;
-       private Set<Permissions> permissions;
 
        /**
         * Constructor for already existing <code>User</code> in the Datacontext.
@@ -37,7 +36,6 @@ public class User implements Cloneable{
                this.mail = mail;
                this.name = name;
                this.lastname = lastname;
-               permissions = new HashSet<>();
        }
 
        /**
@@ -138,33 +136,4 @@ public class User implements Cloneable{
     public User clone() throws CloneNotSupportedException {
         return (User)super.clone();
     }
-       
-       /**
-        * @param permission
-        */
-       public void addPermission(Permissions permission){
-               permissions.add(permission);
-       }
-       
-       /**
-        * @param permission
-        */
-       public void removePermission(Permissions permission){
-               if(permissions.contains(permission)) permissions.remove(permission);
-       }
-       
-       /**
-        * @return
-        */
-       public Set<Permissions> getPermissions(){
-               return permissions;
-       }
-       
-       /**
-        * @param permission
-        * @return
-        */
-       public boolean hasPermission(Permissions permission){
-               return permissions.contains(permission);
-       }
 }
\ No newline at end of file