package guardian

  1. Overview
  2. Docs

Module Make.AuthorizerSource

Sourcemodule Actor : sig ... end
Sourcemodule Target : sig ... end
Sourceval compare_auth_rule : auth_rule -> auth_rule -> Ppx_deriving_runtime.int
Sourcetype effect = Action.t * Target.spec

action, target Denotes an effect a function may have on and therefore which permissions an actor needs to invoke it.

Sourceval compare_effect : effect -> effect -> Ppx_deriving_runtime.int
Sourcemodule Effect_set : sig ... end
Sourceval checker_of_rules : ?any_of:bool -> 'a Authorizable.t -> auth_rule list -> (unit, string) CCResult.t

Convenience function to return a can function. Takes an optional target specification (for error reporting purposes) and a list of guardian rules of the form actor, action, target and returns a function that looks like:

any_of: indicates that the checker should pass if any of the rules in the list is satisfied. The default behaviour is to only pass if all rules are. val can : actor:[ whatever ] Guard.Authorizable.t -> (unit, string) result

Sourcemodule Auth_rule_set : sig ... end
Sourcemodule type Actor_module = sig ... end
Sourcemodule type Target_module = sig ... end
OCaml

Innovation. Community. Security.