Closed (fixed)
Project:
Commerce Point of Sale (POS)
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2018 at 12:09 UTC
Updated:
22 Aug 2018 at 17:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gmem commentedFrom what I've seen I don't think it's possible to assign specific permissions to individual users, so having the cashier group is the best way of handling that. It is possible to assign new a new group the permissions to essentially become a cashier, and it's also possible to assign users to more than one group. Curious if you can elaborate a little bit on this issue.
Comment #3
geek-merlinIt's good practice to have permissions, not undocumented hardcoded roles. You can still create a role and assign that permission by default. Everything else violates the "law of least surprise" ;-).
Comment #4
travis-bradbury commentedIs
CashierUsers::getCashiers()actually used? I don't see it being used but that might just be incompetent use of my IDE. It does seem like a valid issue though - there are permissions like "access commerce pos pages". You could make a new role called Supervisor with more permissions than Cashier (like "alter product unit price") and if you're thinking "give me all the cashiers in the system" you'd probably expect them to be included. So users that are cashiers is probably better defined as users who have any role that grants the permissions that define a cashier.Comment #5
gmem commentedI can confirm it doesn't seem to see any use anywhere in code, but it may have been intended for something in the commerce-pos-cashier-login.html.twig template? Maybe as some sort of list of available users? Meanwhile here's a patch that removes the function - I haven't experienced any errors in my testing thus far.
Comment #6
gmem commentedComment #8
smccabe commentedEverything should just be the individual cashier permissions, it looks like that is some vestigial function that is never used, if i recall there was an issue to remove that old roles stuff before, this part probably just got missed.