View Source Rolex.Control (Rolex v0.4.0)

Provides functions for granting, denying, and revoking permissions.

Summary

Functions

Creates a role-denying Rolex.Permission from DSL options.

Creates a role-denying Rolex.Permission from DSL options.

Creates a role-denying Rolex.Permission from DSL options, prefilling on: object_scope.

Creates a role-denying Rolex.Permission from DSL options, prefilling on: object_scope.

Creates a role-denying Rolex.Permission from DSL options, prefilling role: role.

Creates a role-denying Rolex.Permission from DSL options, prefilling role: role.

Creates a role-denying Rolex.Permission from DSL options, prefilling to: subject_scope.

Creates a role-denying Rolex.Permission from DSL options, prefilling to: subject_scope.

Creates a role-granting Rolex.Permission from DSL options.

Creates a role-granting Rolex.Permission from DSL options.

Creates a role-granting Rolex.Permission from DSL options, prefilling on: object_scope.

Creates a role-granting Rolex.Permission from DSL options, prefilling on: object_scope.

Creates a role-granting Rolex.Permission from DSL options, prefilling role: role.

Creates a role-granting Rolex.Permission from DSL options, prefilling role: role.

Creates a role-granting Rolex.Permission from DSL options, prefilling to: subject_scope.

Creates a role-granting Rolex.Permission from DSL options, prefilling to: subject_scope.

Adds a multi operation to create a role-denying Rolex.Permission.

Adds a multi operation to create a role-denying Rolex.Permission from DSL options, prefilling on: object_scope.

Adds a multi operation to create a role-denying Rolex.Permission from DSL options, prefilling role: role.

Adds a multi operation to create a role-denying Rolex.Permission from DSL options, prefilling to: subject_scope.

Adds a multi operation to create a role-granting Rolex.Permission.

Adds a multi operation to create a role-granting Rolex.Permission from DSL options, prefilling on: object_scope.

Adds a multi operation to create a role-granting Rolex.Permission from DSL options, prefilling role: role.

Adds a multi operation to create a role-granting Rolex.Permission from DSL options, prefilling to: subject_scope.

Adds an operation to delete all Rolex.Permissions matching the given DSL options.

Adds a multi operation to delete all Rolex.Permissions matching the given DSL options, prefilling from: subject_scope.

Adds a multi operation to delete all Rolex.Permissions matching the given DSL options, prefilling on: object_scope.

Adds a multi operation to delete all Rolex.Permissions matching the given DSL options, prefilling role: role.

Deletes all Rolex.Permissions matching the given DSL options.

Deletes all Rolex.Permissions matching the given DSL options.

Deletes all Rolex.Permissions matching the given DSL options, prefilling from: subject_scope.

Deletes all Rolex.Permissions matching the given DSL options, prefilling from: subject_scope.

Deletes all Rolex.Permissions matching the given DSL options, prefilling on: object_scope.

Deletes all Rolex.Permissions matching the given DSL options, prefilling on: object_scope.

Deletes all Rolex.Permissions matching the given DSL options, prefilling role: role.

Deletes all Rolex.Permissions matching the given DSL options, prefilling role: role.

Functions

Creates a role-denying Rolex.Permission from DSL options.

Returns :ok on success, or {:error, reason} otherwise.

See Rolex.DSL for options.

Creates a role-denying Rolex.Permission from DSL options.

Returns :ok on success, or raises an exception otherwise.

See Rolex.DSL for options.

Link to this function

deny_on(object_scope, opts \\ [])

View Source

Creates a role-denying Rolex.Permission from DSL options, prefilling on: object_scope.

Returns {:ok, object_scope} on success.

See Rolex.DSL for other options.

Link to this function

deny_on!(object_scope, opts \\ [])

View Source

Creates a role-denying Rolex.Permission from DSL options, prefilling on: object_scope.

Returns object_scope on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

deny_role(role, opts \\ [])

View Source

Creates a role-denying Rolex.Permission from DSL options, prefilling role: role.

Returns {:ok, role} on success.

See Rolex.DSL for other options.

Link to this function

deny_role!(role, opts \\ [])

View Source

Creates a role-denying Rolex.Permission from DSL options, prefilling role: role.

Returns role on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

deny_to(subject_scope, opts \\ [])

View Source

Creates a role-denying Rolex.Permission from DSL options, prefilling to: subject_scope.

Returns {:ok, subject_scope} on success.

See Rolex.DSL for other options.

Link to this function

deny_to!(subject_scope, opts \\ [])

View Source

Creates a role-denying Rolex.Permission from DSL options, prefilling to: subject_scope.

Returns subject_scope on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Creates a role-granting Rolex.Permission from DSL options.

Returns :ok on success, or {:error, reason} otherwise.

See Rolex.DSL for options.

Creates a role-granting Rolex.Permission from DSL options.

Returns :ok on success, or raises an exception otherwise.

See Rolex.DSL for options.

Link to this function

grant_on(object_scope, opts \\ [])

View Source

Creates a role-granting Rolex.Permission from DSL options, prefilling on: object_scope.

Returns {:ok, object_scope} on success.

See Rolex.DSL for other options.

Link to this function

grant_on!(object_scope, opts \\ [])

View Source

Creates a role-granting Rolex.Permission from DSL options, prefilling on: object_scope.

Returns object_scope on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

grant_role(role, opts \\ [])

View Source

Creates a role-granting Rolex.Permission from DSL options, prefilling role: role.

Returns {:ok, role} on success.

See Rolex.DSL for other options.

Link to this function

grant_role!(role, opts \\ [])

View Source

Creates a role-granting Rolex.Permission from DSL options, prefilling role: role.

Returns role on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

grant_to(subject_scope, opts \\ [])

View Source

Creates a role-granting Rolex.Permission from DSL options, prefilling to: subject_scope.

Returns {:ok, subject_scope} on success.

See Rolex.DSL for other options.

Link to this function

grant_to!(subject_scope, opts \\ [])

View Source

Creates a role-granting Rolex.Permission from DSL options, prefilling to: subject_scope.

Returns subject_scope on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

multi_deny(multi, opts \\ [])

View Source

Adds a multi operation to create a role-denying Rolex.Permission.

Returns the updated multi.

See Rolex.DSL for options.

Link to this function

multi_deny_on(multi, object_scope, opts \\ [])

View Source

Adds a multi operation to create a role-denying Rolex.Permission from DSL options, prefilling on: object_scope.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_deny_role(multi, role, opts \\ [])

View Source

Adds a multi operation to create a role-denying Rolex.Permission from DSL options, prefilling role: role.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_deny_to(multi, subject_scope, opts \\ [])

View Source

Adds a multi operation to create a role-denying Rolex.Permission from DSL options, prefilling to: subject_scope.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_grant(multi, opts \\ [])

View Source

Adds a multi operation to create a role-granting Rolex.Permission.

Returns the updated multi.

See Rolex.DSL for options.

Link to this function

multi_grant_on(multi, object_scope, opts \\ [])

View Source

Adds a multi operation to create a role-granting Rolex.Permission from DSL options, prefilling on: object_scope.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_grant_role(multi, role, opts \\ [])

View Source

Adds a multi operation to create a role-granting Rolex.Permission from DSL options, prefilling role: role.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_grant_to(multi, subject_scope, opts \\ [])

View Source

Adds a multi operation to create a role-granting Rolex.Permission from DSL options, prefilling to: subject_scope.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_revoke(multi, opts)

View Source

Adds an operation to delete all Rolex.Permissions matching the given DSL options.

Returns the updated multi.

See Rolex.DSL for options.

Link to this function

multi_revoke_from(multi, subject_scope, opts \\ [])

View Source

Adds a multi operation to delete all Rolex.Permissions matching the given DSL options, prefilling from: subject_scope.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_revoke_on(multi, object_scope, opts \\ [])

View Source

Adds a multi operation to delete all Rolex.Permissions matching the given DSL options, prefilling on: object_scope.

Returns the updated multi.

See Rolex.DSL for other options.

Link to this function

multi_revoke_role(multi, role, opts \\ [])

View Source

Adds a multi operation to delete all Rolex.Permissions matching the given DSL options, prefilling role: role.

Returns the updated multi.

See Rolex.DSL for other options.

Deletes all Rolex.Permissions matching the given DSL options.

Returns {:ok, <number-of-permissions-deleted>} on success, or {:error, changeset} otherwise.

See Rolex.DSL for options.

Deletes all Rolex.Permissions matching the given DSL options.

Returns the number of permissions deleted on success, or raises an exception otherwise.

See Rolex.DSL for options.

Link to this function

revoke_from(subject_scope, opts \\ [])

View Source

Deletes all Rolex.Permissions matching the given DSL options, prefilling from: subject_scope.

Returns {:ok, subject_scope} on success.

See Rolex.DSL for other options.

Link to this function

revoke_from!(subject_scope, opts \\ [])

View Source

Deletes all Rolex.Permissions matching the given DSL options, prefilling from: subject_scope.

Returns the number of permissions deleted on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

revoke_on(object_scope, opts \\ [])

View Source

Deletes all Rolex.Permissions matching the given DSL options, prefilling on: object_scope.

Returns {:ok, object_scope} on success.

See Rolex.DSL for other options.

Link to this function

revoke_on!(object_scope, opts \\ [])

View Source

Deletes all Rolex.Permissions matching the given DSL options, prefilling on: object_scope.

Returns the number of permissions deleted on success, or raises an exception otherwise.

See Rolex.DSL for other options.

Link to this function

revoke_role(role, opts \\ [])

View Source

Deletes all Rolex.Permissions matching the given DSL options, prefilling role: role.

Returns {:ok, role} on success.

See Rolex.DSL for other options.

Link to this function

revoke_role!(role, opts \\ [])

View Source

Deletes all Rolex.Permissions matching the given DSL options, prefilling role: role.

Returns the number of permissions deleted on success, or raises an exception otherwise.

See Rolex.DSL for other options.