View Source Bonfire.Boundaries.Debug (Bonfire v0.9.10-classic-beta.169)
Debug utilities for Bonfire Boundaries.
This module provides functions to debug and inspect user circles, ACLs, and grants.
Summary
Functions
Prints debug information about all grants on specific things.
Prints debug information about grants on specific things for given verbs.
Prints debug information about users' grants on specific things.
Prints debug information about an object's ACLs.
Prints debug information about a user's ACLs.
Prints debug information about a user's circles.
Functions
Prints debug information about all grants on specific things.
Examples
iex> Bonfire.Boundaries.Debug.debug_grants_on(things)
+------------+------------+---------+-------+
| subject_id | object_id | verbs | value |
+------------+------------+---------+-------+
| user_1 | object_1 | [read] | true |
| user_2 | object_2 | [reply] | true |
| user_2 | object_2 | [edit] | false |
+------------+------------+---------+-------+
Prints debug information about grants on specific things for given verbs.
Examples
iex> Bonfire.Boundaries.Debug.debug_grants_on(things, [:read, :edit])
+------------+------------+---------+-------+
| subject_id | object_id | verbs | value |
+------------+------------+---------+-------+
| user_1 | object_1 | [read] | true |
| user_2 | object_2 | [edit] | false |
+------------+------------+---------+-------+
Prints debug information about users' grants on specific things.
Examples
iex> Bonfire.Boundaries.Debug.debug_my_grants_on(users, things)
+------------+------------+---------+-------+
| subject_id | object_id | verbs | value |
+------------+------------+---------+-------+
| user_1 | object_1 | [read] | true |
| user_2 | object_2 | [write] | false |
+------------+------------+---------+-------+
Prints debug information about an object's ACLs.
Examples
iex> Bonfire.Boundaries.Debug.debug_object_acls(object)
Object: object_id
+--------+----------+-----------+------------+---------------+-----------+
| acl_id | acl_name | acl_stereo| grant_verb | grant_subject | grant_value |
+--------+----------+-----------+------------+---------------+-----------+
| acl_1 | Private | null | read | Friends | true |
| acl_2 | Public | null | write | Everyone | false |
+--------+----------+-----------+------------+---------------+-----------+
Prints debug information about a user's ACLs.
Examples
iex> Bonfire.Boundaries.Debug.debug_user_acls(user)
user ACLs: user_id
+--------+----------+-----------+------------+---------------+-----------+
| acl_id | acl_name | acl_stereo| grant_verb | grant_subject | grant_value |
+--------+----------+-----------+------------+---------------+-----------+
| acl_1 | Private | null | read | Friends | true |
| acl_2 | Public | null | write | Everyone | false |
+--------+----------+-----------+------------+---------------+-----------+
iex> Bonfire.Boundaries.Debug.debug_user_acls(user, "Custom label")
Custom label user ACLs: user_id
...
Prints debug information about a user's circles.
Examples
iex> Bonfire.Boundaries.Debug.debug_user_circles(user)
User: user_id
+------------+------------+
| circle_id | circle_name|
+------------+------------+
| circle_1 | Friends |
| circle_2 | Family |
+------------+------------+