Hello Samuele, 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) - defined a kb with the institution code as key, and the ip rules as values and enrich the user_info with these informations Many thanks in advance for your advises. Regards, ---------------------------------------------------------------------- Johnny Mariéthoz RERO, Av. de la Gare 45, CH - 1920 MARTIGNY Téléphone: +41(0)27 721 8579 Fax : +41(0)27 721 8586 Web : http://www.rero.ch ReroDoc : http://doc.rero.ch, [email protected] ---------------------------------------------------------------------- Le 2 déc. 2013 à 16:55, Samuele Kaplun <[email protected]> a écrit : > In data lunedì 2 dicembre 2013 16:36:07, Johnny Mariéthoz ha scritto: >> why not enrich the user_info by the list of the role that he belongs to: >> from access_control_admin import acc_get_user_roles_from_user_info, >> acc_get_role_name user_info["roles"] = [acc_get_role_name(v) for v in >> acc_get_user_roles_from_user_info(user_info)] > > Well, that's quite recursive since roles are now typically defined using > firerole rules which are based on user_info :-) > > Cheers! > Sam > > -- > Samuele Kaplun > Invenio Developer ** <http://invenio-software.org/> > INSPIRE Service Manager ** <http://inspirehep.net/>

