Changeset - fc4027fe46bc
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-06-29 12:32:30
marcin@python-works.com
fixed bug when user is capable of creating _admin repository which is a link to admin interface
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pylons_app/model/forms.py
Show inline comments
 
@@ -138,7 +138,9 @@ def ValidRepoName(edit=False):
 
            
 
        def to_python(self, value, state):
 
            slug = h.repo_name_slug(value)
 
            
 
            if slug in ['_admin']:
 
                raise formencode.Invalid(_('This repository name is disallowed'),
 
                                         value, state)
 
            sa = meta.Session
 
            if sa.query(Repository).get(slug) and not edit:
 
                raise formencode.Invalid(_('This repository already exists'),
0 comments (0 inline, 0 general)