ZoneOwnershipIndex
final class ZoneOwnershipIndex (View source)
Who owns which of a page of zones, resolved once so per-row controls do not query per zone. Ownership is direct (zones.owner) or through any group the user belongs to.
Methods
No description
No description
Whether any zone on the page is group-owned, so group names are worth loading.
No description
Whether a permission level ("all", "own", "own_as_client", "none") lets the user act on the zone; the "_own" levels additionally need ownership.
Details
__construct(int $userId, array $userGroupIds, array $ownersByZone, array $groupsByZone)
No description
bool
owns(int $zoneId)
No description
bool
hasGroupOwners()
Whether any zone on the page is group-owned, so group names are worth loading.
array
groupIds(int $zoneId)
No description
bool
allows(string $level, int $zoneId)
Whether a permission level ("all", "own", "own_as_client", "none") lets the user act on the zone; the "_own" levels additionally need ownership.