Hi Johnny,
In data mercoledì 4 dicembre 2013 08:39:01, Johnny Mariéthoz ha scritto:
> thus considering the two following approaches, which one is the best:
>
> - enrich the user_info by the list of roles (but as you wrote it can be
> somehow recursive)
Exactly, it can't really properly work.
> - defined a kb with the institution code as key, and the
> ip rules as values and enrich the user_info with these informations
Indeed this is even a nicer formulation. I wonder if it can become slightly a
performance impact... surely it's going to be slower and slower the more
network ranges you'd put in this KB. We can cache this computation per
session, but guests users will typically have a different session per every
guest request.
I guess in next this will happily be cached in redis...
Cheers,
Sam
--
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>
INSPIRE Service Manager ** <http://inspirehep.net/>