Remove unused ldap_id
ldap_id is not used at any places and default_data.json doesn't contain it for user information. So let's remove it for the cleanup. Change-Id: Ic4a27a6bd882ae6fd700a85c0661c2b2407bad88
This commit is contained in:
@@ -41,9 +41,6 @@
|
||||
{%if zanata_id %}
|
||||
<div>Zanata: <a href="https://translate.openstack.org/profile/view/${zanata_id}" target="_blank">${zanata_id}</a></div>
|
||||
{%/if%}
|
||||
{%if ldap_id %}
|
||||
<div>LDAP: ${ldap_id}</div>
|
||||
{%/if%}
|
||||
{%if core %}
|
||||
<div>Core in:
|
||||
{%each( index, value ) core %}
|
||||
|
@@ -188,8 +188,7 @@ class RecordProcessor(object):
|
||||
|
||||
# collect ordinary fields
|
||||
for key in ['seq', 'user_name', 'user_id', 'gerrit_id', 'github_id',
|
||||
'launchpad_id', 'companies', 'static', 'ldap_id',
|
||||
'zanata_id']:
|
||||
'launchpad_id', 'companies', 'static', 'zanata_id']:
|
||||
value = next((v.get(key) for v in user_profiles if v.get(key)),
|
||||
None)
|
||||
if value:
|
||||
|
@@ -33,9 +33,6 @@ default_data = {
|
||||
"gerrit_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"ldap_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"zanata_id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@@ -22,8 +22,7 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def make_user_id(emails=None, launchpad_id=None, gerrit_id=None,
|
||||
member_id=None, github_id=None, ldap_id=None, ci_id=None,
|
||||
zanata_id=None):
|
||||
member_id=None, github_id=None, ci_id=None, zanata_id=None):
|
||||
if launchpad_id or emails:
|
||||
return launchpad_id or emails[0]
|
||||
if gerrit_id:
|
||||
@@ -32,8 +31,6 @@ def make_user_id(emails=None, launchpad_id=None, gerrit_id=None,
|
||||
return 'member:%s' % member_id
|
||||
if github_id:
|
||||
return 'github:%s' % github_id
|
||||
if ldap_id:
|
||||
return 'ldap:%s' % ldap_id
|
||||
if zanata_id:
|
||||
return 'zanata:%s' % zanata_id
|
||||
if ci_id:
|
||||
@@ -56,9 +53,6 @@ def store_user(runtime_storage_inst, user):
|
||||
if user.get('github_id'):
|
||||
runtime_storage_inst.set_by_key('user:github:%s' % user['github_id'],
|
||||
user)
|
||||
if user.get('ldap_id'):
|
||||
runtime_storage_inst.set_by_key('user:ldap:%s' % user['ldap_id'],
|
||||
user)
|
||||
if user.get('zanata_id'):
|
||||
runtime_storage_inst.set_by_key('user:zanata:%s' % user['zanata_id'],
|
||||
user)
|
||||
@@ -68,15 +62,13 @@ def store_user(runtime_storage_inst, user):
|
||||
|
||||
def load_user(runtime_storage_inst, seq=None, user_id=None, email=None,
|
||||
launchpad_id=None, gerrit_id=None, member_id=None,
|
||||
github_id=None, ldap_id=None, zanata_id=None):
|
||||
github_id=None, zanata_id=None):
|
||||
if gerrit_id:
|
||||
key = 'gerrit:%s' % gerrit_id
|
||||
elif member_id:
|
||||
key = 'member:%s' % member_id
|
||||
elif github_id:
|
||||
key = 'github:%s' % github_id
|
||||
elif ldap_id:
|
||||
key = 'ldap:%s' % ldap_id
|
||||
elif zanata_id:
|
||||
key = 'zanata:%s' % zanata_id
|
||||
else:
|
||||
|
@@ -125,8 +125,7 @@ class TestConfigFiles(testtools.TestCase):
|
||||
def _verify_users_in_alphabetical_order(self, file_name):
|
||||
users = self._read_file(file_name)['users']
|
||||
self._verify_ordering(
|
||||
users, key=lambda x: (x.get('launchpad_id') or x.get('ldap_id') or
|
||||
x.get('github_id')),
|
||||
users, key=lambda x: (x.get('launchpad_id') or x.get('github_id')),
|
||||
msg='List of users should be ordered by launchpad id or ldap id '
|
||||
'or github id')
|
||||
|
||||
|
Reference in New Issue
Block a user