--Advanced--

in D7 POS, cashiers and users were separate, to handle switching users different than authentication. This proved problematic as there was a constant disconnect between the 2 "types" of users, an no default user functionality could be used without customization to work for cashiers. In D8 we went back to having cashiers be users, with the idea that solving the user login speed problem was easier than constantly running 2 users.

Repeat login needs to be fast, but initial setup can be slow, as adding new employees is not frequent compared to opening tills. A possible idea is requiring a full login and then saving a key of some sort (sort of like how 1password does it) that would allow the user to use a second, simpler key or password and a dropdown list for faster login? This would require someone trying to brute force to have both keys, verses just 1 simple key.

I am not sure how we would store the key, possible a cookie or session variable?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smccabe created an issue. See original summary.

smccabe’s picture

Assigned: Unassigned » gvollo
smccabe’s picture

Assigned: gvollo » Unassigned
Status: Active » Needs work
FileSize
4.3 KB

Patch of gvollo's initial work, as he no longer has time to work on it.

rakesh.gectcr’s picture

Status: Needs work » Needs review

#2904199: PHP Fatal error: Class 'Drupal\Core\Form\UserLoginForm' not found will help us to login / switch the user from the path "/cashier-login"

Still going to "/cashier-quick-login" gets WSOD because it is trying to use
use Drupal\commerce_pos\Entity\Cashiers; $users = Cashiers::getUsers();which is not found.

How to go forward on this?

And what about the Cashier ID? Is it a config Entity?

rakesh.gectcr’s picture

Related issues: +#2903634: Alpha 1 - Meta
smccabe’s picture

Gord had initially built this with cashier being an entity, but cashier is actually just going to be a user with a cashier role now.

smccabe’s picture

Status: Needs review » Needs work
rakesh.gectcr’s picture

Ok. So we need a service container, for getting all the users having the role of "pos_cashier"
#2905080: Get all the users having the role of "pos_cashier"

rakesh.gectcr’s picture

FileSize
1.58 KB

Ones #2905080: Get all the users having the role of "pos_cashier" got committed. We can use the service like in attached patch.

Question:
1) How can we implement cashier id ? Field ? Config?

rakesh.gectcr’s picture

Status: Needs work » Needs review
smccabe’s picture

Cashier ID should probably be a field on the user.

smccabe’s picture

Status: Needs review » Needs work
rakesh.gectcr’s picture

Existing patch has been updated according to the change in #2905080: Get all the users having the role of "pos_cashier"

rakesh.gectcr’s picture

Cashier ID as field on User Entity has been added on #2905999: Cachier ID should be a field to User Entity

rakesh.gectcr’s picture

Status: Needs work » Needs review
smccabe’s picture

Status: Needs review » Needs work

is the patch above right? it looks like it has some of the menu links and such removed, is that correct? It is only a form that isn't called anymore.

The code in the patch looks fine, just missing a bunch.

Also the blocking issues have been committed now, so this should be good to move forward on.

rakesh.gectcr’s picture

@smccabe

I have split this issue initially and added as child, So the menu is committed from
#2904199: PHP Fatal error: Class 'Drupal\Core\Form\UserLoginForm' not found
However IS has to be updated.

rakesh.gectcr’s picture

Assigned: Unassigned » rakesh.gectcr
rakesh.gectcr’s picture

Please Review...

rakesh.gectcr’s picture

Status: Needs work » Needs review

smccabe’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.