Resolves#1408.
A rule with match "METHOD" carries a comma-separated list of HTTP
methods in its value, e.g. "POST,PUT", and applies when the request
method is in that list. This makes it possible to leave GET public
while sending POST and PUT to auth, which rules could not express
before because both share the same path.
No new columns: the methods live in the existing rule value, so this
needs no migration and every existing rule keeps working unchanged.
The UI offers the ten registered methods. Blueprints and the API
accept any method token, so extension methods such as the WebDAV verbs
can be targeted too, and the UI preserves them when a rule set that
way is edited later.
Add 13 secondary indexes across 10 tables in the SQLite schema and
5 missing indexes to the PostgreSQL schema.
All list endpoints (listSites, listResources, listClients, listRoles,
listTargets, listUserOrgs) filter and join on these FK columns. In the
SQLite schema, no secondary indexes existed at all on these foreign keys,
forcing full sequential scans on every paginated request and session lookup.
SQLite changes (13 new indexes):
- sites.orgId
- resources.orgId
- targets.resourceId, targets.siteId
- newt.siteId
- clients.orgId, clients.userId
- labels.orgId
- olms.userId
- session.userId
- userOrgs.userId, userOrgs.orgId
- roles.orgId
PG changes (5 new indexes, rest already present):
- labels.orgId
- session.userId
- userOrgs.userId, userOrgs.orgId
- roles.orgId
- olms.userId