1.2.2 (Option) Remove Role

Remove role Step-by-Step test guide

Removes a previously assigned role from user. The caller must be a signed account that is registered in AdminAccounts. The function checks the (user, role) pair exists in AccountRoles, removes it, emits RoleRemoved { user, role }, and returns Ok(()).

  1. Developer → Extrinsics.

  2. Account: select an admin account.

  3. Extrinsic: choose xcavateWhitelist.

  4. Call: remove_role.

  5. Parameters:

    • user: account to assign role to (e.g., Charlie).

    • role: select role enum (e.g., RegionalOperator). Select the role that the chosen user (e.g., Charlie) was assigned to earlier.

  6. Submit Transaction and Sign and Submit

  1. Transaction approved with a green tick at the top right hand corner of the screen

✅ Check result:

  • Developer → (1) Chain State → (2) xcavateWhitelist → accountRoles → (3) accountId32 (Charlie) → (4) Click + Query

  • Should return (5) None.

Last updated