package com.pandoli365.bibimbap.security;

public enum PermissionKeys {
    GAME_JAM_MANAGE("게임잼 관리"),
    POST_WRITE("포스팅 작성"),
    CONTENT_MODERATE("콘텐츠 모더레이션");

    private final String displayName;

    PermissionKeys(String displayName) {
        this.displayName = displayName;
    }

    public String displayName() {
        return displayName;
    }

    public static boolean isValid(String key) {
        if (key == null) {
            return false;
        }
        try {
            valueOf(key);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }
}
