SecureX.Res (SecureX v0.1.0) View Source
Link to this section Summary
Functions
Add a Resource. You can send either Atom Map
or String Map
to add Resource.
Delete a Resource. All Permissions
will be removed against this resource.
Update a Resource. You can update any resource along with its permissions.
You can send either Atom Map
or String Map
to update Role. It will automatically
update resource_id
in Permissions
table.
Link to this section Functions
Specs
Add a Resource. You can send either Atom Map
or String Map
to add Resource.
Examples
iex> add(%{"res" => "Person Farm"})
%Resource{
id: "person_farm",
name: "Persons Farm"
}
Specs
Delete a Resource. All Permissions
will be removed against this resource.
Examples
iex> delete(%{"id" => "person_organization")
%Resource{
id: "person_organization",
name: "Person Organization",
permissions: :successfully_removed_permissions
}
Specs
Update a Resource. You can update any resource along with its permissions.
You can send either Atom Map
or String Map
to update Role. It will automatically
update resource_id
in Permissions
table.
Examples
iex> update(%{"id" => "person_farm", "name" => "Person Organization"})
%Resource{
id: "person_organization",
name: "Person Organization",
permissions: :successfully_updated_permissions
}