##// END OF EJS Templates
fixed bug when user is capable of creating _admin repository which is a link to admin interface
marcink -
r310:fc4027fe default
parent child Browse files
Show More
@@ -138,7 +138,9 b' def ValidRepoName(edit=False):'
138
138
139 def to_python(self, value, state):
139 def to_python(self, value, state):
140 slug = h.repo_name_slug(value)
140 slug = h.repo_name_slug(value)
141
141 if slug in ['_admin']:
142 raise formencode.Invalid(_('This repository name is disallowed'),
143 value, state)
142 sa = meta.Session
144 sa = meta.Session
143 if sa.query(Repository).get(slug) and not edit:
145 if sa.query(Repository).get(slug) and not edit:
144 raise formencode.Invalid(_('This repository already exists'),
146 raise formencode.Invalid(_('This repository already exists'),
General Comments 0
You need to be logged in to leave comments. Login now