[sip] utilisation de ldap_readonly
This commit is contained in:
parent
c74b61e941
commit
f917a5c467
3 changed files with 4 additions and 8 deletions
|
@ -45,7 +45,7 @@ class Profile(object):
|
|||
conn.close()
|
||||
|
||||
if caller_id == 'full_name' or caller_id == 'both':
|
||||
conn=lc_ldap.shortcuts.lc_ldap_admin()
|
||||
conn=lc_ldap.shortcuts.lc_ldap_readonly()
|
||||
aid=int(num[1:])
|
||||
adh=conn.search(u'aid=%s' % aid)[0]
|
||||
return '%s %s' % (adh['prenom'][0],adh['nom'][0])
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
import sys
|
||||
sys.path.append('/usr/scripts/')
|
||||
|
||||
from lc_ldap.shortcuts import lc_ldap_admin
|
||||
import lc_ldap.shortcuts
|
||||
from lc_ldap.attributs import imprimeur, nounou
|
||||
from impression import digicode
|
||||
|
||||
conn=lc_ldap_admin()
|
||||
conn = lc_ldap.shortcuts.lc_ldap_readonly()
|
||||
|
||||
try:
|
||||
aid=int(sys.argv[1][1:])
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
sys.path.append('/usr/scripts/')
|
||||
sys.path.append('/etc/crans/secrets/')
|
||||
|
||||
import secrets
|
||||
import lc_ldap.shortcuts
|
||||
|
||||
|
||||
conn=lc_ldap.shortcuts.lc_ldap_admin()
|
||||
conn=lc_ldap.shortcuts.lc_ldap_readonly()
|
||||
try:
|
||||
if len(sys.argv[1])==5:
|
||||
aid=int(sys.argv[1][1:])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue