MishkaDocument. Resources. Calculations. WorkspaceMaintainers
(Mishka Document v0.0.1)
Copy Markdown
View Source
Calculates unique maintainers for a workspace based on EventLog.
Maintainers are users who have successfully created or updated:
- Sections belonging to workspace versions of the workspace
- Notes belonging to sections of the workspace
Returns a map with:
count- number of unique maintainers, at most 100maintainers- list of%{"user_id", "email", "name"}: the 100 who wrote most recently, listed by"name", then"user_id"
"email" is the address when the reader may see it — a master sees everyone's, a site user its
own site's — and nil otherwise. "name" is what a screen shows: the email, "Master" for a
master, "Unknown" for anyone else (MishkaCmsCore.Accounts.Helper.who/4). Neither which
maintainers are listed nor their order depends on an address the reader does not see.
Uses raw SQL for performance with large datasets.
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.load/3.
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.
Callback implementation for Ash.Resource.Calculation.load/3.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.