Metadata

Distro Index Owner:
eea
Home Page:
eea.usersdb
License
Version:
2.7
Last updated:
2021-11-22
Keywords:

eea.usersdb

Files

Indexes

EEA Users DB

eea.usersdb

Develop Master Release

Library to access the EIONET users database, stored in LDAP.

>>> import eea.usersdb
>>> users_db = eea.usersdb.UsersDB(ldap_server='ldap2.eionet.europa.eu')
>>> print users_db.user_info('someuserid')
... {'id': 'someuserid', 'full_name': ...}

Changelog

2.7 - (2021-11-22)

  • allow digits in role_id filtering [valipod]

2.6 - (2021-04-08)

  • add email validation (replacing validate_email package) [dumitval]

2.5 - (2021-01-08)

  • Bugfix related to encoding in search [dumitval]

2.4 - (2020-12-04)

  • fix encoding in all_organisations [valipod]

2.3 - (2020-05-13)

  • Change: Tests and Linters [valipod]

2.2 - (2020-03-03)

  • Change: Add jenkins badges Refs #110159 [valentinab25]

2.1 - (2020-02-26)

  • Feature: updated Jenkins pipeline [alecghica refs #110159]

2.0 (2020-02-13)

  • telephone is no longer mandatory [dumitval]
  • fix for newer chameleon version [dumitval]

1.3.43 (2018-04-27)

  • revert 1.3.42 and 1.3.41 [dumitval]

1.3.42 (2018-04-26)

  • handle size limit exceeded (2nd try) [dianaboiangiu]

1.3.41 (2018-04-25)

  • handle size limit exceeded [dianaboiangiu]

1.3.40 (2018-02-12)

  • added pwdChangedTime to operational schema [dumitval refs #92555]

1.3.39 (2017-12-04)

  • fix crash when org_id is invalid (contains forbidden chars) [dumitval]

1.3.38 (2017-07-13)

  • adapted asserts to new python-ldap result format [dumitval]

1.3.37 (2017-06-07)

  • handle unicode organisation titles in org_info [dumitval]

1.3.36 (2017-01-18)

  • Bug fix: in writing reasonToCreate to new users [dumitval]

1.3.35 (2017-01-18)

  • updates script to move data from destinationIndicator to reasonToCreate [dumitval]
  • use the new field reasonToCreate instead of destinationIndicator [dumitval]
  • added migration script for adding eionetAccount object class [dumitval]

1.3.34 (2016-12-05)

  • add validator for first and last name [dumitval]

1.3.33 (2016-10-03)

  • add organisation name in national language [dumitval]
  • make organisation, phone number and reason to create the account mandatory when creating users [dumitval]
  • fix crash in validate_email for unicode addresses [dumitval]
  • add Department to the user details [dumitval]
  • add name in native language to the searched fields [dumitval]
  • add name in native language and search helper to user details [dumitval]

1.3.32 (2015-11-24)

  • return empty set when searching for inexisting organisations [dumitval]

1.3.31 (2015-11-04)

  • restore roles only on demand (when enabling users) [dumitval]

1.3.30 (2015-10-27)

  • update validation schema for email (max length for domain name) [dumitval]

1.3.29 (2015-08-21)

  • Change: added a pending_disable user attribute, mapped to LDAP field employeeNumber
  • Bug fix: when enabling a user, don't fail when re-adding to roles if any of the roles has been removed [tiberich #28191]

1.3.28 (2015-05-25)

  • Change: no longer change emails for disabled users [tiberich #24321]

1.3.27 (2015-05-14)

  • Feature: allow recording an organisation changelog [tiberich #20663]

1.3.26 (2015-03-30)

  • Feature: allow passing bind=True to agent_from_uf agent factory [tiberich #24362]
  • Bug fix: properly record organisation ids when enabling/disabling user [tiberich #24386]

1.3.25 (2015-03-24)

  • Feature: added a method to get the original email of a disabled user [tiberich #23187]

1.3.24 (2015-01-15)

  • Change: allow getting all subroles for a specific role in _all_roles_list [tiberich #21218]
  • Feature: allow excluding disabled users in search_user and search_user_email [tiberich #22488]

1.3.23 (2014-10-02)

  • Change: change label of the account description field [tiberich #21245]

1.3.22 (2014-10-02)

  • Bug fix: use the destinationIndicator field for the account description, as it is not filled in with old values [tiberich #21245]

1.3.20 (2014-10-02)

  • Feature: added the account description field for the EIONET users [tiberich #21245]

1.3.19 (2014-09-24)

  • Feature: added method to reset user roles [tiberich #9164]

1.3.18 (2014-09-19)

  • Feature: added a method to retrive orgs for a user [tiberich #20832]
  • Bug fix: fix logging of removed roles when disabling user [tiberich #20422]
  • Feature: added agent.new_action() context manager that enables grouping of actions to facilitate understanding the user changelog [tiberich #20422]

1.3.17 (2014-08-13)

  • Bug fix: convert user_dn to string when adding to organisation. To make sure and avoid future problems, always convert _user_dn() call results to strings [tiberich #20633]

1.3.16 (2014-08-08)

  • add EmailAlreadyExists exception for clearer error messages [dumitval]

1.3.15 (2014-07-25)

  • Feature: added role_infos_in_role method which returns more information about subroles, given a parent role [tiberich #18817]

1.3.14 (2014-07-15)

  • Bug fix: avoid UnicodedEcodeErrors from ldap server when searching for an organisation [tiberich]
  • Feature: added the all_roles method that returns role_info for all roles in db [tiberich #19143]

1.3.13 (2014-07-02)

  • fix for empty organisations [dumitval]

1.3.12 (2014-07-01)

  • Feature: added the org_exists API method to avoid clogging logs with tracebacks from LDAP server [tiberich #19143]

1.3.11 (2014-06-26)

  • Feature: added the possibilty to perform merge roles, prefill roles [tiberich #20140]

1.3.10 (2014-03-12)

  • Feature: added support for pending membership to organisations [tiberich #15263]
  • Bug fix: properly parse timestamps when format contains microseconds [tiberich #18676]
  • Feature: allow using streaming methods to get the results from ldap, for large result sets [tiberich #18676]

1.3.9 (2014-02-03)

  • Change: avoid dependency on Zope's DateTime, use datetime instead [tiberich, alex morega]

1.3.8 (2013-12-04)

  • Bug fix: permitted senders are not users, don't try to save changelog for them [tiberich #17608]
  • PEP8 the db_agent.py module [tiberich]

1.3.7 (2013-12-03)

  • Bug fix: fixed adding/edditing permitted sender [tiberich #17608]

1.3.6 (2013-11-21)

  • allow single quotes (') in user's email address [dumitval]
  • Feature: Added a method to retrieve all user information from ldap sql data dump [tiberich #16665]
  • Feature: added the email/mail field to the EIONET organisation schema [tiberich #17369]

1.3.5 (23-10-2013)

  • Allow enable/disable of users [tiberich #17085]

1.3.4 (2013-10-10)

  • Allow removing inexisting ldap users from ldap roles (cleanup) [dumitval]

1.3.3 (2013-09-05)

  • changed output of all_organisations [simiamih refs #15628]

1.3.2 (2013-08-06)

  • using "c" for country of organisations [simiamih]

1.3.1 (2013-06-17)

  • method to unset/rm role leader [simiamih refs #14597]

1.3.0 (2013-02-21)

  • using phonenumbers lib to validate phone numbers [simiamih refs #10163]
  • complete agent API to return info for multiple uids [mihaitab refs #9181]
  • adding/removing owner for a role propagates to subroles [simiamih refs #9994]
  • duplicate emails no longer allowed for users [simiamih refs #9181]
  • getcertificate; may be used in profile page [simiamih refs #13772]
  • implements hierarchicalGroup for roles [simiamih refs #9231]

1.2.2 (2012-11-30)

  • new method: members_in_subroles_with_source [simiamih]

1.2.1 (2012-11-12)

  • uid is not editable, keep it as operational attr [simiamih]

1.2.0 (2012-11-09)

  • including some operational ldap attrs in user info unpack [simiamih]
  • added factories module [simiamih]
  • update for creating users in custom RDN setup [simiamih]

1.1.1 (2012-08-29)

  • new method: set_role_description [simiamih]

1.1.0 (2012-07-19)

  • _user_id and _user_dn do not assume uid is in dn [simiamih]
  • introduced new config: users_rdn [simiamih]
  • removed attr-s of roles passed to _user_id [simiamih]

1.0.7 (2012-07-03)

  • Updated db_agent to support different LDAP schemas in search and other operations [bogdatan]

1.0.6 (2012-06-06)

  • search_user accepts lookup selectors [bogdatan]

1.0.5 (2012-06-01)

  • added members_in_role_and_subroles [simiamih]
  • new fix for compatibility with python-ldap 2.4.9 [simiamih]

1.0.4 (2012-05-22)

  • compatibility with python-ldap 2.4.9 [simiamih]

1.0.3 (2012-05-10)

  • case insensitive assertion for ldap role results [simiamih]
  • creating role adds mailingListGroup objectClass, owner and permittedSender attributes [simiamih]

1.0.2 (2012-02-10)

  • member removal methods: rm from roles, organisations, rm user [simiamih]
  • bulk methods: check emails and usernames for existence in db [simiamih]
  • more options for filter_roles: filterstr and attrlist [simiamih]
  • fix: removing user from role also removes him from ancestor roles that do not have subroles containing user [simiamih]

1.0.1 (2011-04-06)

  • Backport to Python 2.4 [moregale]

1.0 (2011-03-07)

  • Initial version [moregale]