package de.terrestris.shogun2.model.security;


/**
 * @author Nils Bühner
 *
 */
public enum Permission {
	ADMIN("ADMIN"),
	DELETE("DELETE"),
	UPDATE("UPDATE"),
	READ("READ");

	private final String permission;

	/**
	 * Enum constructor
	 *
	 * @param value
	 */
	private Permission(String permission) {
		this.permission = permission;
	}

	public static Permission fromString(String inputValue) {
		if (inputValue != null) {
			for (Permission permission : Permission.values()) {
				if (inputValue.equalsIgnoreCase(permission.permission)) {
					return permission;
				}
			}
		}
		return null;
	}

	/**
	 *
	 */
	@Override
	public String toString() {
		return permission;
	}

}

@@ -117,16 +117,35 @@
 DMIN%22),%0A
+%09CREATE(%22CREATE%22),%0A
 %09DELETE(

Introduce Permission.CREATE