Managers¶
The Yoyaku Manager submodule (yoyaku_manager) scopes who may administer
which resources, and who places orders through which booking channels. A
manager holds the manage own resources permission and, through it, may edit
the slots, tariffs, opening dates and bookings of the resources granted to
them, and nothing else. Canceling one of those bookings frees its place and can
lead to a refund, so it also takes the cancel booking permission, as canceling
a whole order does. Site administrators (administer yoyaku) keep full access
and are unaffected.
Grant scopes¶
Management is granted through manager grants, and a grant can be scoped at one of three levels:
- Resource grant: the user manages one resource. Right for venues run independently, such as mountain refuges, where each refuge is in a different place and run by a different team.
- Resource type grant: the user manages every resource of a type. Useful when one team owns a whole tariff of resources within a tenant.
- Tenant grant: the user manages every resource of a tenant. Right for a venue like an auditorium, where one team runs every resource: grant the team once and they manage all of it, including resources added later.
The levels mirror the containment tenant → resource type → resource, so a tenant grant covers every type and resource in that tenant without enumerating them.
Grants combine¶
A user may hold any mix of grants, of any scopes. The resources they manage are the union of what all their grants resolve to. So one user can be, at the same time, a tenant-wide manager of one venue, a type manager of a tariff, and the manager of a handful of individual resources. A resource created later is picked up automatically by any type or tenant grant that covers it, with no new grant.
Assigning managers¶
Each scope is edited on its own entity's Managers tab, alongside Edit:
- A single resource: the Managers tab on the resource edit page (or the bulk Assign managers screen) grants and revokes resource-scoped managers.
- A resource type: the Managers tab on the resource type edit page grants everyone who should manage every resource of that type.
- A tenant: the Managers tab on the tenant edit page grants everyone who should manage every resource of that tenant.
Every grant may carry an optional expiry, after which it lapses and is purged on cron.
Who may grant¶
Grant authority is per tenant. assign resource managers is the site-wide
authority; the generated assign resource managers in tenant: X permission
confines a holder to granting within tenant X. A type or tenant grant is
authored by whoever may assign in the target's tenant.
Channel operators¶
Managers administer resources; channel operators place orders for someone else, at a box office or over the phone, through the booking channels granted to them. The two are separate grants: a clerk selling at a counter manages nothing, and a resource manager sells nowhere unless also granted a channel.
A channel's Operators tab grants that channel to a person; a tenant's Operators tab grants every channel of the tenant, including channels added later. Each grant says:
- Handles the orders taken there: the operator also sees and handles the
orders placed in the channel, whoever placed them. Without it they only place
orders, and see none of the channel's orders. Canceling one still takes the
cancel bookingpermission, and handling orders never extends to deleting one. - Starts and Expires: optional. Someone covering another counter for a day gets a grant on that counter for that day, rather than a flag on their own; the same counter may be granted on several separate days ahead, but two grants of one person overlapping on a channel are refused.
Global roles keep their cross-channel permissions: a role that manages the tenant's orders places and handles orders in every channel, and a grant only ever adds to what a person may do. Lapsed grants are purged on cron, and a grant goes with the channel or the user it names.
Operator authority is per tenant, like grant authority: assign booking channel
operators is the site-wide permission, and the generated assign booking
channel operators in tenant: X confines a holder to tenant X. Assigning
managers is not assigning operators.
Offering a workflow step to them¶
The yoyaku_orchestra_manager submodule turns managership into a workflow
audience: a step assigned to resource_managers is offered to whoever manages
the resources of the order the instance is running for, at any grant scope, and
notifies them by default. It is a bridge between two optional modules, so it
carries the audience rather than either side, and installing it is what a site
running its bookings as a workflow does to route operator steps by resource.
Extending resolution¶
Management resolution is pluggable: every service tagged
yoyaku_manager.resource_resolver contributes resource ids, and they are merged.
The shipped default reads the grant entity; an integration (for example Group or
Workbench Access) can add its own resolver so a site derives managership however
it likes, without touching the engine's enforcement.