Skip to content

Commit 2c4d90d

Browse files
Raja Sripadatiborsimko
authored andcommitted
BibCirculation: fix for CERN returnees
Acked-by: Tibor Simko <[email protected]>
1 parent 0420a85 commit 2c4d90d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/bibcirculation/lib/bibcirculation_cern_ldap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## This file is part of Invenio.
2-
## Copyright (C) 2009, 2010, 2011 CERN.
2+
## Copyright (C) 2009, 2010, 2011, 2014 CERN.
33
##
44
## Invenio is free software; you can redistribute it and/or
55
## modify it under the terms of the GNU General Public License as
@@ -88,6 +88,8 @@ def get_user_info_from_ldap(nickname="", email="", ccid=""):
8888
## Maybe one ExCern and primary at the same time. In this case let's give precedence to ExCern
8989
types = {}
9090
for result in results:
91+
if result[1]['employeeType'][0] == 'Primary' and result[1]['userAccountControl'][0] == '512':
92+
return result[1]
9193
types[result[1]['employeeType'][0]] = result[1]
9294
if 'ExCern' in types and 'Primary' in types:
9395
return types['ExCern']

0 commit comments

Comments
 (0)