Stop requiring unnecessary aggregation_unit:toplevel_query:toplevel_query
permission scopes
#5718
Labels
aggregation_unit:toplevel_query:toplevel_query
permission scopes
#5718
Following #5163, access to a
toplevel_query
query ataggregation_unit
level with aother_query
sub-query requires bothaggregation_unit:toplevel_query:other_query
andaggregation_unit:toplevel_query:toplevel_query
permission scopes.This means that the
aggregation_unit:toplevel_query:toplevel_query
scope is always required, but it is possible for FlowAuth users to define a role withaggregation_unit:toplevel_query:other_query
but notaggregation_unit:toplevel_query:toplevel_query
, which doesn't actually grant permission for any query (but this may not be intuitively clear to the user).I wonder whether it would be best to only require
aggregation_unit:toplevel_query:toplevel_query
(in FlowAPI) if there are no sub-queries? (I.e. if a user has the required sub-query scopes, they don't need to also have the additional top-level scope). Effectively this would change the meaning ofaggregation_unit:toplevel_query:toplevel_query
from "can run atoplevel_query
query" to "can run atoplevel_query
query with no sub-queries".An alternative could be to enforce this on the FlowAuth side (i.e. if
agg_unit:tl_query:sub_query
is selected, automatically addagg_unit:tl_query:tl_query
to the role as well). But I think overall it's cleaner to handle this in FlowAPI.Originally posted by @jc-harrison in #5163 (comment)
The text was updated successfully, but these errors were encountered: