Ory.Api.Permission (ory_client v1.6.2)

API calls for all endpoints tagged Permission.

Summary

Functions

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Expand a Relationship into permissions. Use this endpoint to expand a relationship tuple into permissions.

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Functions

Link to this function

check_permission(connection, opts \\ [])

@spec check_permission(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.CheckPermissionResult.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :namespace (String.t): Namespace of the Relationship
    • :object (String.t): Object of the Relationship
    • :relation (String.t): Relation of the Relationship
    • :subject_id (String.t): SubjectID of the Relationship
    • :"subject_set.namespace" (String.t): Namespace of the Subject Set
    • :"subject_set.object" (String.t): Object of the Subject Set
    • :"subject_set.relation" (String.t): Relation of the Subject Set
    • :"max-depth" (integer()):

Returns

  • {:ok, Ory.Model.CheckPermissionResult.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

check_permission_or_error(connection, opts \\ [])

@spec check_permission_or_error(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.CheckPermissionResult.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :namespace (String.t): Namespace of the Relationship
    • :object (String.t): Object of the Relationship
    • :relation (String.t): Relation of the Relationship
    • :subject_id (String.t): SubjectID of the Relationship
    • :"subject_set.namespace" (String.t): Namespace of the Subject Set
    • :"subject_set.object" (String.t): Object of the Subject Set
    • :"subject_set.relation" (String.t): Relation of the Subject Set
    • :"max-depth" (integer()):

Returns

  • {:ok, Ory.Model.CheckPermissionResult.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

expand_permissions(connection, namespace, object, relation, opts \\ [])

@spec expand_permissions(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.ExpandedPermissionTree.t()}
  | {:error, Tesla.Env.t()}

Expand a Relationship into permissions. Use this endpoint to expand a relationship tuple into permissions.

Parameters

  • connection (Ory.Connection): Connection to server
  • namespace (String.t): Namespace of the Subject Set
  • object (String.t): Object of the Subject Set
  • relation (String.t): Relation of the Subject Set
  • opts (keyword): Optional parameters
    • :"max-depth" (integer()):

Returns

  • {:ok, Ory.Model.ExpandedPermissionTree.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_check_permission(connection, opts \\ [])

@spec post_check_permission(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.CheckPermissionResult.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"max-depth" (integer()):
    • :body (PostCheckPermissionBody):

Returns

  • {:ok, Ory.Model.CheckPermissionResult.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_check_permission_or_error(connection, opts \\ [])

@spec post_check_permission_or_error(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.CheckPermissionResult.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}

Check a permission To learn how relationship tuples and the check works, head over to the documentation.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"max-depth" (integer()):
    • :body (PostCheckPermissionOrErrorBody):

Returns

  • {:ok, Ory.Model.CheckPermissionResult.t} on success
  • {:error, Tesla.Env.t} on failure