| 1 | //! Authorization predicates shared between use cases. |
| 2 | //! |
| 3 | //! One answer per question, in one place. A predicate copied into a second use case |
| 4 | //! is a predicate that will eventually disagree with itself — and an authorization |
| 5 | //! check that disagrees with itself fails open somewhere. |
| 6 | |
| 7 | use crate; |
| 8 | |
| 9 | use Result; |
| 10 | |
| 11 | /// Whether the actor owns this organisation. |
| 12 | /// |
| 13 | /// Owner is strictly stronger than membership: a member may read what they can see, |
| 14 | /// but editing the profile, creating a repository, and pushing are all owner-only. |
| 15 | /// "Signed in" quietly becoming "allowed" is the usual way this goes wrong. |
| 16 | pub async |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 |