Assigns a role to a user. The caller must be a signed account that is already registered in AdminAccounts. The function checks the role is not already assigned, inserts the (user, role) entry into AccountRoles storage, emits RoleAssigned { user, role }, and returns Ok(()).
Developer → Extrinsics.
Account: select an admin account.
Extrinsic: choose xcavateWhitelist.
Call: assign_role.
Parameters:
user: account to assign role to (e.g., Charlie)
role: select role enum (e.g., RegionalOperator).
Submit transaction.
Sign and submit.
Transaction approved with green tick on the top right hand corner.