Restrict set_vereinfacht_contact_id to system actor
- Add ActorIsSystemUser policy check - Member set_vereinfacht_contact_id only allowed for system user
This commit is contained in:
parent
9d3c72acff
commit
1188320844
2 changed files with 18 additions and 3 deletions
|
|
@ -333,10 +333,10 @@ defmodule Mv.Membership.Member do
|
|||
authorize_if Mv.Authorization.Checks.HasPermission
|
||||
end
|
||||
|
||||
# Internal sync action: allow setting vereinfacht_contact_id (used only by SyncContact change).
|
||||
# Internal sync action: only SystemActor may set vereinfacht_contact_id (used by SyncContact change).
|
||||
policy action(:set_vereinfacht_contact_id) do
|
||||
description "Allow internal sync to set Vereinfacht contact ID"
|
||||
authorize_if always()
|
||||
description "Only system actor may set Vereinfacht contact ID"
|
||||
authorize_if Mv.Authorization.Checks.ActorIsSystemUser
|
||||
end
|
||||
|
||||
# CREATE/UPDATE: Forbid member–user link unless admin, then check permissions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue