All notable changes to Sekisho are documented in this file.
The format follows Keep a Changelog, and Sekisho follows Semantic Versioning.
[Unreleased]
Added
- A permissions module (
use Sekisho) and policies (Sekisho.Policy): rules as functions that returntrue,falseor an Ecto condition (allow/2,deny/2, which wins), and roles, withderivefrom a role of the same record, from a role or a permission of a related record (abelongs_to, or a relation of your sources), and down a relation to the same schema to any depth. allowed?/3,authorize/3,authorize!/3(Sekisho.Denied, a 403 or a 404),where_allowed/3andwith_permissions/3, from one condition: the union of every path, each a set the database hashes.- Grants (
sekisho_grants): a role on a record to a person, a group or anyone with a link, for good or until a date;grant/4,revoke/4,grants/2, checked so no one gives a role above their own. - Roles each record defines (
custom_roles(),sekisho_roles):create_role/4,update_role/3,delete_role/2,roles/2. - Roles, relations and groups from your own tables (
Sekisho.Sources). - Fields:
allow_fields/2,allowed_fields/2,redact/2. explain/3(Sekisho.Explanation): the paths that allow a permission.Sekisho.LiveView: events checked beforehandle_event/3, and pages that lose their access sent away, over PubSub (changed/0for your own tables).mix sekisho.install(Igniter) andmix sekisho.gen.migration, onPhoenixMountable.Migrations.Sekisho.Test:assert_allowed,refute_allowed,assert_where_allowed;validate!/0.