WeaviateEx.RBAC.UserAssignment (WeaviateEx v0.7.4)
View SourceUser assignment with type information.
Represents a user assigned to a role, including their user type which indicates how the user was created/authenticated.
User Types
:db_user- Database-backed user created via the Users.DB API:db_env_user- Database user created via environment variables:oidc- User authenticated via OpenID Connect
Examples
{:ok, assignments} = RBAC.get_user_assignments(client, "editor")
for assignment <- assignments do
IO.puts("#{assignment.user_id} (type: #{assignment.user_type})")
end
Summary
Functions
Check if the user is a database-backed user.
Parse user assignment from API response.
Creates a new UserAssignment struct.
Check if the user is an OIDC user.
Parse user type string to atom.
Convert user assignment to API format.
Convert user type atom to API string.
Types
Functions
Check if the user is a database-backed user.
Parse user assignment from API response.
Examples
assignment = UserAssignment.from_api(%{"userId" => "john", "userType" => "db_user"})
# => %UserAssignment{user_id: "john", user_type: :db_user}
Creates a new UserAssignment struct.
Examples
assignment = UserAssignment.new("john.doe", :db_user)
Check if the user is an OIDC user.
Parse user type string to atom.
Convert user assignment to API format.
Convert user type atom to API string.