|
a/Allura/allura/controllers/project.py |
|
b/Allura/allura/controllers/project.py |
|
... |
|
... |
298 |
except exc.HTTPNotFound:
|
298 |
except exc.HTTPNotFound:
|
299 |
redirect(g.forge_static('images/user.png'))
|
299 |
redirect(g.forge_static('images/user.png'))
|
300 |
|
300 |
|
301 |
@expose('json:')
|
301 |
@expose('json:')
|
302 |
def user_search(self,term=''):
|
302 |
def user_search(self,term=''):
|
|
|
303 |
if len(term) < 3:
|
|
|
304 |
raise exc.HTTPBadRequest('"term" param must be at least length 3')
|
303 |
users = M.User.by_display_name(term, substring=True)
|
305 |
users = M.User.by_display_name(term, substring=True)
|
304 |
named_roles = RoleCache(
|
306 |
named_roles = RoleCache(
|
305 |
g.credentials,
|
307 |
g.credentials,
|
306 |
g.credentials.project_roles(project_id=c.project.root_project._id).named)
|
308 |
g.credentials.project_roles(project_id=c.project.root_project._id).named)
|
307 |
result = [ [], [] ]
|
309 |
result = [ [], [] ]
|