You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as "stale:discard". If this issue still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment.
Steps to Reproduce
I have a case in plug router as such.
Im testing the read case match - I have a macro that generates the permission as %{ <table_name> : [:<table_name>_read]
I'm logging the objects to iex with IO.inspect
as you can see in the logs I've logged the available permissions and the provided permission set:
even though the permission set is not within the structure or claims the function all_permissions? returns 'true'
Logs
Expected Result
I would expect the function to return false as the provided permission %{test_table5: [:read_test_table5]} does not exist in the permissions:
%{
groups: [:create_groups, :delete_groups, :read_groups, :update_groups],
groups_roles: [:create_groups_roles, :delete_groups_roles, :read_groups_roles,
:update_groups_roles],
groups_users: [:create_groups_users, :delete_groups_users, :read_groups_users,
:update_groups_users],
records: [:create_records, :delete_records, :read_records, :update_records],
roles: [:create_roles, :delete_roles, :read_roles, :update_roles],
tables: [:create_tables, :delete_tables, :read_tables, :update_tables],
user_groups: [:create_user_groups, :delete_user_groups, :read_user_groups,
:update_user_groups],
users: [:create_users, :delete_users, :read_users, :update_users],
users_roles: [:create_users_roles, :delete_users_roles, :read_users_roles,
:update_users_roles],
views: [:create_views, :delete_views, :read_views, :update_views]
}
Actual Result
the function returns true for any permission
Worth noting im providing only one permission set to all_permissions?
Is there something Im missing here.
The text was updated successfully, but these errors were encountered: