Pagelove is deny-by-default. Every read and write the app performs is granted here, and nothing else.
| Actor | Resource | Method | Selector | Action |
|---|---|---|---|---|
| * |
|
|
allow | |
| * | /templates/new-poll.html |
|
allow | |
| * | /polls/* |
|
allow | |
| * | /polls/* |
|
tbody#responses | allow |
| * | /polls/* |
|
tbody#responses > tr[itemtype="https://pagelove.org/PollResponse"] | allow |
Closed shapes: a write that introduces any element or attribute not listed below is rejected with 422. They fire on the granular write paths the app uses (POST into the responses body, PUT/DELETE on a response row).
tr[id][itemscope][itemtype="https://pagelove.org/PollResponse"]
th[scope="row"][itemprop="name"]
td[itemprop="vote"][data-option][data-vote]
:has(> th[itemprop="name"])
th[scope="row"][itemprop="name"]
td[itemprop="vote"][data-option][data-vote]
Templated creation needs a document-level PUT grant on /polls/*. On its own that grant would let any visitor replace any element of an existing poll, or the whole document. These triggers run before the write and refuse what the rules alone cannot express.
POST into #responses and PUT on a response row
PUT: a poll that already exists cannot be overwritten