Hi Chris,

> Isn't authorization provided for each call?  Thus, isn't it available
> along with the query?
> 
> Does it effect the query, or just the possible return values?  My
> approach would be to run the query, collect the set of possible values,
> then return that filtered by authorization.  Thus the query doesn't
> need to understand who is calling it (and could be cached, precomputed,
> whatever) as the auth happens in the filtering of the results.  Is this
> incorrect?

This is certainly how it could be done and we might even end up doing it like 
this. 

Once we are inside the REST-endpoint, we know who the user is, what groups 
he/she belongs to and thus what he/she is allowed to see. The difficult part 
with filtering the search result *after* querying is to return a fixed number 
of result items when a limit and offset is used for paging. Say the user wants 
to see page 5 of *his/her* search results with 20 items per page. We now need 
to load *all* of the items, filter out those that he/she can't see until we 
match the correct 20 items. And we need to do that for page 6 again.

Solr could do all of that for us in a much faster way without requiring to load 
all the data if we were able to specify the auth-filter criteria at search time.

Doea that make sense?

Tobias
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to