|
a/Allura/allura/lib/plugin.py |
|
b/Allura/allura/lib/plugin.py |
|
... |
|
... |
462 |
log.exception('Error registering project %s' % project_name)
|
462 |
log.exception('Error registering project %s' % project_name)
|
463 |
raise forge_exc.ProjectOverlimitError()
|
463 |
raise forge_exc.ProjectOverlimitError()
|
464 |
|
464 |
|
465 |
self.rate_limit(user, neighborhood)
|
465 |
self.rate_limit(user, neighborhood)
|
466 |
|
466 |
|
|
|
467 |
if user_project and shortname.startswith('u/'):
|
|
|
468 |
shortname = shortname.replace('u/', '', 1)
|
467 |
if not h.re_project_name.match(shortname.replace('/', '')):
|
469 |
if not h.re_project_name.match(shortname):
|
468 |
raise ValueError('Invalid project shortname: %s' % shortname)
|
470 |
raise ValueError('Invalid project shortname: %s' % shortname)
|
469 |
|
471 |
|
470 |
p = M.Project.query.get(shortname=shortname, neighborhood_id=neighborhood._id)
|
472 |
p = M.Project.query.get(shortname=shortname, neighborhood_id=neighborhood._id)
|
471 |
if p:
|
473 |
if p:
|
472 |
raise forge_exc.ProjectConflict('%s already exists in nbhd %s' % (shortname, neighborhood._id))
|
474 |
raise forge_exc.ProjectConflict('%s already exists in nbhd %s' % (shortname, neighborhood._id))
|