Add option to disable partial autocompletion of users
This commit is contained in:
parent
6600b380ca
commit
c6aad5fef0
4 changed files with 29 additions and 2 deletions
|
@ -1017,6 +1017,23 @@ class TestGetMatchingEntities(ApiTestCase):
|
|||
assert 'outsideorg' in names
|
||||
assert not 'owners' in names
|
||||
|
||||
def test_prefix_disabled(self):
|
||||
with patch('features.PARTIAL_USER_AUTOCOMPLETE', False):
|
||||
self.login(NO_ACCESS_USER)
|
||||
|
||||
json = self.getJsonResponse(EntitySearch, params=dict(prefix='o', namespace=ORGANIZATION,
|
||||
includeTeams='true'))
|
||||
|
||||
names = set([r['name'] for r in json['results']])
|
||||
assert not 'outsideorg' in names
|
||||
assert not 'owners' in names
|
||||
|
||||
json = self.getJsonResponse(EntitySearch, params=dict(prefix='outsideorg', namespace=ORGANIZATION,
|
||||
includeTeams='true'))
|
||||
names = set([r['name'] for r in json['results']])
|
||||
assert 'outsideorg' in names
|
||||
assert not 'owners' in names
|
||||
|
||||
def test_inorg(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
|
|
Reference in a new issue