BiteBuddy
Restaurant operations

Why a role in the request body is not enough

Each restaurant action looks up the signed-in person’s live membership and rank, so a staff or manager role pasted into the request is ignored.

BiteBuddy Kitchen Desk 3 min read

Illustration of a request being checked against a membership book rather than a label on the envelope

Restaurant tools do not believe a role because a screen, a script, or an old tab says so. On each request that changes a restaurant, the API loads the restaurant named in the address and then loads the membership row for the signed-in user. Staff sits under manager, and manager sits under owner. The action declares the minimum rank it needs. If the stored rank is lower, or the row is missing, the request stops.

What is actually compared

The session identifies the person. The membership table identifies their rank on that restaurant. Those two have to meet. A field in the body that says owner, manager, or staff is not the rank that gets compared. Changing it in the browser tools does not promote anyone. The technology note for this product says the same thing in shorter form: the check looks up the membership and does not trust an id sent in the body. Platform admins skip the membership test and are marked as admins for that request. Everyone else, including an owner of a different restaurant, is a stranger to this one.

The lookup sees the current row. If an owner removes you, the next call fails even if the dashboard is still open and still shows yesterday’s buttons. If your rank drops from manager to staff, the next menu edit fails, while order work that only needs staff can continue. There is no grace period stored in the page. That is why a shared computer at the pass should be signed out when the shift ends. The tab is not a key. The membership is.

What this means for the roster

Invite people as their own accounts and set the rank you mean. Staff for the order list and for rejecting a pending ticket. Manager for the menu, the hours, the gallery, and the website presentation. Owner for publishing, for adding and removing people, and for the Google link on a branch. The ladder is explained for day-to-day choices under accounts and verification together with the email code you can require at sign-in. The live check is why those choices stick. A staff account cannot edit its own rank by replaying a request it watched a manager send.

Do not put one owner password in a group chat so the whole kitchen can “be the owner”. Every action would be that owner, the live check would pass, and you would have no idea who archived a branch. Removal would mean changing the password and hoping every copy died. Separate memberships let you remove one person and leave the others working on the next request.

What owners should expect to see

A forbidden response on a button the person used last week is usually a rank change, a removal, or a restaurant they do not belong to. It is not fixed by refreshing until the body is edited. An owner looks at the team list and sets the rank again if the change was a mistake. A manager can see the list and cannot rewrite it. If the person should not be on the restaurant at all, removal is the end of their access, including replies to reviews, which also look up membership at the moment they are sent. Sign them out of the shared machine anyway. The next request is what matters, and the next request will not find them.