ZoneCreateOwnershipResolver
class ZoneCreateOwnershipResolver (View source)
Resolves the user-owner and group-owner assignment for a new zone, applying the active zone_ownership_mode and permission rules. The API hands in its JSON body; the web forms hand in the owner and groups they already parsed.
Methods
No description
Why a user cannot pick any owner for a new zone in groups_only mode: no group exists at all, or the user belongs to none. Null when they can.
No description
The rules shared by the API and the web forms: the groups must exist, a zone needs at least one owner, giving it to another user needs zone_content_edit_others, and non-admins may only pick their own groups.
Details
__construct(ZoneOwnershipModeService $mode, PermissionService $permissions, UserGroupRepositoryInterface $groups)
No description
string|null
ownerOptionsBlocker(int $callerUserId)
Why a user cannot pick any owner for a new zone in groups_only mode: no group exists at all, or the user belongs to none. Null when they can.
ZoneOwnershipResolution
resolve(array $input, int $callerUserId)
No description
ZoneOwnershipResolution
resolveOwnership(int|null $owner, array $groupIds, int $callerUserId)
The rules shared by the API and the web forms: the groups must exist, a zone needs at least one owner, giving it to another user needs zone_content_edit_others, and non-admins may only pick their own groups.