incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [01/50] [abbrv] git commit: [#6179] don't change 'shortname' var
Date Tue, 07 May 2013 22:30:43 GMT
Updated Branches:
  refs/heads/tv/3876 66399b86c -> c38d0e9fd (forced update)


[#6179] don't change 'shortname' var


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3d3f1997
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3d3f1997
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3d3f1997

Branch: refs/heads/tv/3876
Commit: 3d3f199782450d1c497a8146528dfe17b2f8c62f
Parents: f746109
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Apr 30 18:30:58 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Apr 30 18:30:58 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/plugin.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3d3f1997/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 02aae3a..3bb1655 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -465,8 +465,10 @@ class ProjectRegistrationProvider(object):
         self.rate_limit(user, neighborhood)
 
         if user_project and shortname.startswith('u/'):
-            shortname = shortname.replace('u/', '', 1)
-        if not h.re_project_name.match(shortname):
+            check_shortname = shortname.replace('u/', '', 1)
+        else:
+            check_shortname = shortname
+        if not h.re_project_name.match(check_shortname):
             raise ValueError('Invalid project shortname: %s' % shortname)
 
         p = M.Project.query.get(shortname=shortname, neighborhood_id=neighborhood._id)


Mime
View raw message