MishkaDocument. Resources. Calculations. AuthoredByMaster
(Mishka Document v0.0.1)
Copy Markdown
View Source
Whether an issue comment was written by a master — a user with no site.
A tenant admin can read a master's comment but not change it (see
MishkaDocument.Resources.Validations.MasterCommentReadOnly), so a tenant's comment list needs
to know which comments to draw without Edit and Delete. Loading :contributor under a tenant
returns nil for a master, the same as for no author, so this asks
MishkaCmsCore.Accounts.Calculations.ByMaster about :contributor_id instead.
A comment whose contributor was deleted has no contributor_id left (on_delete :nilify), so
it is no longer a master's.
Summary
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.init/1.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.init/1.
@spec master_ids([Ash.UUID.t() | nil]) :: {:ok, MapSet.t()} | {:error, term()}
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.