Commit 0b441544 by Juho Juopperi

permissions

1 parent b9e32f32
...@@ -8,13 +8,15 @@ import org.slf4j.Logger; ...@@ -8,13 +8,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* *
* @author tuukka * @author tuukka
*/ */
public enum Permission { public enum Permission {
PERMISSION("Description"), PERMISSION("Description"),
LOGIN("User can see loginbutton. (only defaultuser should have permission to that one)"); LOGIN("User can see loginbutton. (only defaultuser should have permission to that one)"),
userManagement;
private static final Logger logger = LoggerFactory.getLogger(Permission.class); private static final Logger logger = LoggerFactory.getLogger(Permission.class);
private String description; private String description;
...@@ -22,7 +24,7 @@ public enum Permission { ...@@ -22,7 +24,7 @@ public enum Permission {
try { try {
return valueOf(name); return valueOf(name);
} catch (IllegalArgumentException x) { } catch (IllegalArgumentException x) {
logger.error("There is no permission named: "+name); logger.error("There is no permission named: " + name);
throw x; throw x;
} }
} }
...@@ -31,6 +33,9 @@ public enum Permission { ...@@ -31,6 +33,9 @@ public enum Permission {
this.description = description; this.description = description;
} }
Permission() {
}
/** /**
* @return the description * @return the description
*/ */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!