Expand description
Role management checks (permissions §4.2, specification §8.4). cp is the actor’s
effective community permissions; the required MANAGE_ROLES bit is checked by the table.
Functions§
- can_
assign - Whether
actorcould assignroleright now: the check behind invitation default roles and approval (permissions §4.7, specification §8.6 and §8.9).cpmust holdMANAGE_ROLESunless the actor is the owner. - can_
grant - Hierarchy over a role being granted, without
MANAGE_ROLES: not@everyone, H4, and its known bits held (H3). Used bymembership.approve(specification §8.9). - member_
role_ change member.roles.updatefor one roleroleontarget: H1; H2 unless self; H4 on the role; when assigning,role.permissions ⊆ cp(H3).@everyoneis never listed.- role_
create role.create: H3 on the new role’s bits. Returns the new role’s position; the engine shifts every role at or above it up by one.- role_
delete role.delete: not@everyone; H4.- role_
reorder role.reorder:rolesis the community’s role table,movesthe request’s(role_id, new_position)pairs. Every role whose position changes must be below the actor before and after; positions must stay unique and non-zero;@everyonecannot be listed. The owner may move any other role.- role_
update role.update: H4 on the role, H3 onold XOR new.@everyonemay change only its permissions (other_fieldsis true when the body changes anything else).