Advanced

Permissions narrowed to the page

A permission that is asked for is a permission that is given. The narrowing is the reason a page that was not asked about is never touched.

What you will see

refuse ask and grant. Two names is reviewable.

About 1 min of reading

Try It

Compare an ask to a grant

1

Write the ask

printf 'example.com\n' > /tmp/a.txt; wc -l < /tmp/a.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
1. One host is the ask, which is a list.
2

Write the grant

printf 'example.com\nother.com\n' > /tmp/g.txt; wc -l < /tmp/g.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
2. Two hosts is a grant wider than the ask.
3

Refuse the pair

printf 'ask 1 grant 2\n' | awk '{print ($3>$1) ? "refuse ask and grant" : "ok"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
refuse ask and grant. Two names is reviewable.

Data Flow

An ask to a narrowed grant
1 The host is named before the run
↓
2 The ask is written as a list
↓
3 The grant is read at run
↓
4 A wider grant refuses with the pair
Why this works
Why the ask is made before the run

Before is the order that makes a refusal cheap. A refusal after a change is a change that already happened.

The failure at this step

A grant that is wider than the ask. The pair is the answer, and the pair names both.

Examples

The permission is asked per host

The host is named before the run. A named host is a host that a review can be about.

A grant that is wider is refused

The refusal names the grant and the ask. Two names is what makes the difference reviewable.

The grant is read at run

Read, not assumed. Read is what makes a grant that changed a different run.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← The extension answers with a report
Previous Lesson
The extension answers with a report
Next Lesson
Parts talking as a named channel
Parts talking as a named channel →