refactor: Replace actor option patterns with ash_actor_opts helper
- Replace if actor, do: [actor: actor], else: [] with Mv.Helpers.ash_actor_opts/1 - Update email_sync/loader.ex, member validations, member.ex, cycle_generator.ex - Consistent actor handling across non-LiveView modules
This commit is contained in:
parent
555ae15173
commit
897677a782
4 changed files with 27 additions and 6 deletions
|
|
@ -28,6 +28,15 @@ defmodule Mv.MembershipFees.CycleGenerator do
|
|||
Uses PostgreSQL advisory locks to prevent race conditions when generating
|
||||
cycles for the same member concurrently.
|
||||
|
||||
## Authorization
|
||||
|
||||
This module runs systemically and accepts optional actor parameters.
|
||||
When called from hooks/changes, actor is extracted from changeset context.
|
||||
When called directly, actor should be provided for proper authorization.
|
||||
|
||||
All functions accept an optional `actor` parameter in the `opts` keyword list
|
||||
that is passed to Ash operations to ensure proper authorization checks are performed.
|
||||
|
||||
## Examples
|
||||
|
||||
# Generate cycles for a single member
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue