--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?
Comment | File | Size | Author |
---|---|---|---|
#19 | interdiff-2893678-13-19.txt | 2.66 KB | rakesh.gectcr |
#19 | 2893678-19.patch | 2.43 KB | rakesh.gectcr |
#13 | interdiff-2893678-9-13.txt | 1.08 KB | rakesh.gectcr |
#13 | 2893678-13.patch | 1.62 KB | rakesh.gectcr |
Comments
Comment #2
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedComment #3
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedPatch of gvollo's initial work, as he no longer has time to work on it.
Comment #4
rakesh.gectcr#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?
Comment #5
rakesh.gectcrComment #6
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedGord had initially built this with cashier being an entity, but cashier is actually just going to be a user with a cashier role now.
Comment #7
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedComment #8
rakesh.gectcrOk. 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"
Comment #9
rakesh.gectcrOnes #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?
Comment #10
rakesh.gectcrComment #11
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedCashier ID should probably be a field on the user.
Comment #12
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedComment #13
rakesh.gectcrExisting patch has been updated according to the change in #2905080: Get all the users having the role of "pos_cashier"
Comment #14
rakesh.gectcrCashier ID as field on User Entity has been added on #2905999: Cachier ID should be a field to User Entity
Comment #15
rakesh.gectcrComment #16
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commentedis 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.
Comment #17
rakesh.gectcr@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.
Comment #18
rakesh.gectcrComment #19
rakesh.gectcrPlease Review...
Comment #20
rakesh.gectcrComment #22
smccabe CreditAttribution: smccabe as a volunteer and at Acro Commerce commented