Skip to main content

role_create

Function role_create 

Source
pub fn role_create(
    actor: &Party,
    cp: Permissions,
    permissions: Permissions,
    max_position: u32,
) -> Result<u32, Refusal>
Expand description

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.

Specification §8.4 and permissions §4.2 place it “directly below the actor’s highest role”: the actor’s top position (the actor’s role moves up), or max_position + 1 for the owner. An actor holding no role has nothing to place it below and is refused (hierarchy).