Main.drl

14 lines | 328 B Blame History Raw Download
package com.photoz.authz.policy.admin

import org.keycloak.authorization.policy.evaluation.Evaluation;

rule "Authorize View User Album"
    dialect "mvel"
    when
        $evaluation : Evaluation(
            $identity : context.identity,
            $identity.hasRole("user")
       )
    then
       $evaluation.grant();
end