# Function permissions::roles::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.

`zaun_community_protocol::permissions::roles::role_create` · Function

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

`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 the protocol and permissions the protocol 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`).

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/permissions/roles/fn.role_create.html)
