How to create a location role
Create a Harbor Soho role that belongs only to that location and assign its first location permissions from the enabled catalogue. Organisation and system roles are not created from this flow.
In this article
Location roles are for operators who need delegated access within one restaurant without giving them organisation-wide control. In the GB demo, the flow creates the role for Harbor Soho inside Harbor Demo Group.
The app creates the role first and then saves the selected permission list, so treat the permissions step as part of the same operational task even though it is saved through a second backend call.
Before you start
- You are signed in with Harbor Demo Group and Harbor Soho selected as the active location.
- Your account has `permissions:manage` at location scope. `permissions:view` lets you see the roles area, but it is not enough to create a role.
- The location permission catalogue contains at least one enabled permission that can be selected.
- Choose a role name that is not empty, is not `owner`, and does not already exist for Harbor Soho.
- For documentation captures, use the GB demo runtime and remove the temporary role `aaharborsohodocrole` after the capture run.
Instructions
- 1.
Open location roles
Open `location/access?tab=roles` with Harbor Soho active. In the User roles tab, review existing roles, search the table, filter by scope and confirm that Create role is available.
- 2.
Start a new role
Select Create role. The form opens at `location/access/roles/create?tab=roles` with Scope fixed to Location, so the new role belongs to Harbor Soho rather than to the whole organisation.
- 3.
Enter the role details
Enter a clear name, such as Harbor Soho shift supervisor. Add a description only if it helps other administrators understand when to use the role.
- 4.
Select permissions
Use the Permissions table to choose one or more enabled location permissions. Search or paginate if needed, then tick a visible permission such as `brand:view` when it is available in the GB runtime.
- 5.
Create the role
When the name is filled in and at least one permission is selected, select Create role. Antylogic creates the location role first, then saves the selected permission list for the new role.
- 6.
Confirm the result
After the Role created toast, the app returns to User roles. Search the table if needed and verify that the new Harbor Soho role is present before cleaning up any temporary capture data.
Validations and limits
- Create role is only visible and usable when the operator has `permissions:manage` at location scope.
- If the selected organisation or selected location is missing, the page shows a not found state instead of the operational form.
- The primary action stays disabled until the trimmed name has content, at least one permission is selected and there is a change to save.
- The form only offers Location as scope and does not expose a role colour field.
- Only permissions enabled for the location and allowed at location scope are listed.
- The backend trims the name and rejects an empty name, the reserved name `owner`, duplicate names for the same location and any non-location scope.
- Permission assignment replaces the full permission list for the role, and permission IDs are cleaned and deduplicated before saving.
- Role creation and permission assignment are separate saves. If the second save fails, the role may exist without the intended permissions and should be inspected before retrying.
Expected result
Harbor Soho has a custom location-owned role with the selected initial permissions, visible in User roles after the list refreshes. The flow does not create organisation or system roles.