Skip to content

Users & roles ​

Every person who uses CocktailPi logs in as a user, and every user has exactly one role. The roles build on each other: each role can do everything the roles below it can, plus a little more. That way you can let guests order drinks without letting them change your pumps.

Users are managed under Administration → Users (admins only).

User management

The roles ​

RoleTypical useCan additionally…
CatalogA menu to browse, e.g. on a screen in the roomBrowse recipes, categories and collections, use the simple view. Can't order.
UserGuests and familyOrder cocktails and single ingredients, cancel their own order, create collections and edit their own, see the bar (read only) and the order history
Recipe-CreatorPeople who write recipesCreate recipes, edit and delete their own recipes
Pump-Ingredient-EditorThe person who refills the machineChange which ingredients are in the bar, use the shopping advisor and the order statistics, and in the order dialog: set the ingredient and filling level of a pump, pump up, pump back, turn pumps on and off
AdminWhoever runs the machineEverything in Administration except GPIO and Events: ingredients, categories, glasses, users, pumps (name and calibration), reverse pumping and load cell settings, system settings, WiFi, event mode, import/export; edit and delete every recipe and collection; cancel every order
Super-AdminThe person who built the machineHardware and system: add and delete pumps and set their pins, GPIO boards and I²C, power limit, events & actions, backups and updates

Some details worth knowing:

  • Recipes and collections are visible to everyone. "My recipes" only filters the list; there are no private recipes.
  • The order history shows the orders of all users. The statistics need the Pump-Ingredient-Editor role.
  • A Pump-Ingredient-Editor can't open the Pumps page (that needs Admin). Refilling and pumping up are done in the Pumps section of the order dialog or from the shopping advisor.
  • Admins can't create, edit or delete users with a higher role than their own, and nobody can change their own role or lock themselves out. Only a Super-Admin can hand out the Super-Admin role.
  • A locked user can't log in. Unlock them in the user editor or, if you are locked out yourself, on the command line.

The first user ​

On the first start CocktailPi creates the user Admin with the password 123456 and the role Super-Admin. Change the password right away (user menu → My profile), or create your own Super-Admin and delete the default one.

Forgot the password? Reset it on the command line.

Autologin (default users) ​

On a machine in the living room nobody wants to type a password. In the user editor an admin can mark a user for Autologin (local) and/or Autologin (remote). Only admins can change this, also for their own account:

  • Local means the browser on the Pi itself, i.e. the touchscreen.
  • Remote means every other device, e.g. phones in your WiFi.

Whoever opens CocktailPi without logging in is then automatically that user. Pick a harmless role for it, typically User. The editor warns you if you choose an Admin or Super-Admin, because then everyone in front of the machine gets these rights without a password.

People can still log in with their own account. Back to {user} after inactivity sets how long (Off, 2, 5, 10, 15 or 30 minutes, default 5) such a session may stay idle before the client switches back to the autologin user. This is one value for the whole machine. More on this in Kiosk & touchscreen.

Behind a reverse proxy?

If a reverse proxy runs on the Pi, every request looks local. Read the reverse proxy section before you enable a local autologin.

Login with password only ​

Administration → Users → Login with password only hides the username field on the login page: users log in with their password alone. This is handy on a touchscreen. Make sure every user has a different password: if a password matches several users, CocktailPi logs in the one with the highest role.

Try the online demo

Log in with the credentials below. The demo is shared with other visitors and is reset from time to time, so your changes may be lost.

User
Admin
Password
123456