/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.csu.sdmx.web.security;

/**
 *
 * @author themi
 */
public enum Permission {
    ADMINISTER_USERS(0, "Administer users", "Add/remove users and permissions");

    int id;
    String name;
    String comment;
    
    private Permission(int id, String name, String comment) {
        this.id = id;
        this.name = name;
        this.comment = comment;
    }

    public int getId() {
        return id;
    }
    
    public String getName() {
        return name;
    }

    public String getComment() {
        return comment;
    }
    
    public static Permission fromID(String id){
        switch(id){
            case "0":
                return Permission.ADMINISTER_USERS;
        }
        
        return null;
    }
}
