package org.crunchytorch.coddy.user.data.security;

public class Permission {

    public static final String ADMIN = "admin";

    public static final String MODERATION = "MODERATION";

    /**
     * permission to set when we need to protect a user account access.
     */
    public static final String PERSO_ACCOUNT = "personal_account";

    /**
     * permission to set when we need to protect any modifications to a private snippet.
     */
    public static final String PERSO_SNIPPET = "personal_snippet";

    private Permission() {

    }
}

@@ -542,11 +542,418 @@
 %7B%0A%0A    %7D
+%0A%0A    /**%0A     * @param permission the given permission that we have to check%0A     * @return %3Ccode%3Etrue%3C/code%3E if the given permission is recognized. %3Ccode%3Efalse%3C/code%3E if not.%0A     */%0A    public static boolean isPermissionExist(final String permission) %7B%0A        return ADMIN.equals(permission) %7C%7C MODERATION.equals(permission) %7C%7C PERSO_ACCOUNT.equals(permission) %7C%7C PERSO_SNIPPET.equals(permission);%0A    %7D
 %0A%7D%0A

add utils method to verify that the permission exists