Closed duckbytes closed 2 years ago
Looking at what permissions should be allowed for users when looking at an individual task.
At the moment I have something working with these checks:
We could also go with the simpler:
This means if a coord was looking at a task not assigned to them, they would need to assign themselves as a coordinator (or rider) to make changes.
There's also no restriction on writing comments or assigning users to a task (except someone without the appropriate role can't be assigned, i.e. a rider can't assign themselves as a coordinator unless they have the coordinator role, but could assign themselves as a rider).
For demonstration: Full access.
Rider access:
No access:
@PaulFreewheelersEVS can you have a look please and let me know what you think?
Hi Theo
I am struggling to get my head around this. Is it possible to have an environment where I can log in with the three access levels and try it out?
Thanks Paul
From: Theo @.> Sent: 30 June 2022 20:56 To: platelet-app/platelet @.> Cc: PaulFreewheelersEVS @.>; Mention @.> Subject: Re: [platelet-app/platelet] Role based restrictions on task overview (Issue #38)
Looking at what permissions should be allowed for users when looking at an individual task.
At the moment I have something working with these checks:
We could also go with the simpler:
This means if a coord was looking at a task not assigned to them, they would need to assign themselves as a coordinator (or rider) to make changes.
There's also no restriction on writing comments or assigning users to a task (except someone without the appropriate role can't be assigned, i.e. a rider can't assign themselves as a coordinator unless they have the coordinator role, but could assign themselves as a rider).
For demonstration: Full access.
Rider access:
No access:
@PaulFreewheelersEVS https://github.com/PaulFreewheelersEVS can you have a look please and let me know what you think?
— Reply to this email directly, view it on GitHub https://github.com/platelet-app/platelet/issues/38#issuecomment-1171618893 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AYPZ2XDYNE65SBHCR2KOLC3VRX3V7ANCNFSM5QHSUCPQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AYPZ2XAOUXDGWIMU7DIVV2DVRX3V7A5CNFSM5QHSUCP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIXKXYTI.gif Message ID: @. @.> >
Hi @PaulFreewheelersEVS
You can try the demo build:
Switch between the different views on the dashboard and assign or unassign the demo user to any job as the different roles to see how the UI changes.
The task overview should only allow certain actions for someone that is assigned to it as a rider compared to a coordinator.
The rider should only be able to update items under the Actions panel.
The React Context feature may be good for this so that checks don't need to be made in each component.
https://reactjs.org/docs/context.html