1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Wire types for canonical `acl/change-role/0.1`.
use ;
use CreateAclResultBody;
/// Request payload for `acl/change-role/0.1`.
///
/// Role is the one ACL attribute where a lost update is a privilege
/// change, so the transition is **state-checked** rather than applied
/// blind: the producer declares the role it believes the subject holds,
/// and a maintainer whose stored role differs rejects the change
/// instead of overwriting.
///
/// Concretely, without this two admins acting on the same stale read —
/// one demoting to `reader`, one promoting to `admin` — would both
/// "succeed", and whichever landed second would silently win. The
/// demotion would disappear with no error anywhere.
/// Response payload — the entry as it stands after the transition.
/// Same shape as `acl/update`'s, so a caller that already handles one
/// handles the other.
pub type ChangeRoleResultBody = CreateAclResultBody;