Nulls should not make the permission check routine fail and panic. Moreover, we should not be able to introduce nulls in the first place in the canRead and canWrite arrays of a resource.
Actual Behaviour
What's actually going on!
If encountering a null, the permission checking middleware freaks out and throws an error.
Affected Projects
Does this issue propagate to other dependencies or dependants? If so, list them here!
SpeckleAdmin seems to introduce this nulls - not sure - via fast clicking the buttons.
Proposed Solution (if any)
[x] Sanitise permission checking middleware to ignore nulls
[x] Sanitise API to clean nulls from canRead and canWrite arrays on entry.
Step 0:
Expected Behaviour
How things should actually work!
Nulls should not make the permission check routine fail and panic. Moreover, we should not be able to introduce nulls in the first place in the
canRead
andcanWrite
arrays of a resource.Actual Behaviour
What's actually going on!
If encountering a null, the permission checking middleware freaks out and throws an error.
Affected Projects
Does this issue propagate to other dependencies or dependants? If so, list them here!
SpeckleAdmin seems to introduce this nulls - not sure - via fast clicking the buttons.
Proposed Solution (if any)
canRead
andcanWrite
arrays on entry.