You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we fetch parties from the backend, we also pass ?allowedtoinstantiatefilter=true to get a filtered list of those parties allowed to instantiate a given form. However, we also do the exact same filtering in frontend afterwards via reduceToValidParties(). Currently, that seems to do a couple more things that backend doesn't do:
It flattens the list of parties
It removes deleted parties (which is up for debate if we should do, see Support deleted parties when instantiating #2972, and the fact that we have a "show deleted" toggle in our party selection page)
It removes parties where onlyHierarchyElementWithNoAccess: true. As I've understood it, if you only have permissions to instantiate for a subUnit, the main organisation will still show up in the list of valid parties from the backend, but this flag will be toggled on to indicate that the user shouldn't be allowed to click it.
Frontend should not need to do any additional filtering here when we've already asked backend to do that for us. If we decide to fix this in a non-major version, we should take extra care to make this right (these tests are full of mocked data, so I'm less confident in them than most other tests).
The text was updated successfully, but these errors were encountered:
When we fetch parties from the backend, we also pass
?allowedtoinstantiatefilter=true
to get a filtered list of those parties allowed to instantiate a given form. However, we also do the exact same filtering in frontend afterwards viareduceToValidParties()
. Currently, that seems to do a couple more things that backend doesn't do:onlyHierarchyElementWithNoAccess: true
. As I've understood it, if you only have permissions to instantiate for a subUnit, the main organisation will still show up in the list of valid parties from the backend, but this flag will be toggled on to indicate that the user shouldn't be allowed to click it.Frontend should not need to do any additional filtering here when we've already asked backend to do that for us. If we decide to fix this in a non-major version, we should take extra care to make this right (these tests are full of mocked data, so I'm less confident in them than most other tests).
The text was updated successfully, but these errors were encountered: