[ckan-dev] Problem overriding user_list with IAuthFunction
Koebrick, Andrew (MNIT)
andrew.koebrick at state.mn.us
Wed Feb 25 20:39:38 UTC 2015
I am attempting to override the user_list function so that only sysadmins can see our registered users. From this email (https://lists.okfn.org/pipermail/ckan-discuss/2014-January/003217.html) and the Implementing the IAuthFunctions plugin interface tutorial I would have thought that the code below would have worked. But it does not. Any idea? The tutorial is for 2.2 rather that the 2.1 we are running. Could that be the issue?
+++++++++++++++++++++++++++++++++++++++++++++++
#Override user_list so that it is hidden unless sysadmin
def user_list(context, data_dict):
return {'success': False}
class ExampleIAuthFunctionsPlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IAuthFunctions)
def get_auth_functions(self):
return{'user_list': user_list}
++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks,
Andrew Koebrick | MINNESOTA GEOSPATIAL INFORMATION OFFICE
Web Coordinator / Systems administrator / Librarian
MN.IT Services @ CENTRAL
651-201-2465 (w) | 651-296-6398 (f) | andrew.koebrick at state.mn.us<mailto:andrew.koebrick at state.mn.us>
658 Cedar St., Room 300, St. Paul, MN 55155, www.mngeo.state.mn.us<http://www.mngeo.state.mn.us/>
[cid:image002.jpg at 01CE61F8.52552AE0]<http://www.mn.gov/oet>
Information Technology for Minnesota Government | mn.gov/oet<http://www.mn.gov/oet>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150225/db58a411/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1624 bytes
Desc: image001.jpg
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150225/db58a411/attachment-0002.jpg>
More information about the ckan-dev
mailing list