Changeset - 74e455c06881
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-01-25 02:30:48
marcin@python-works.com
remove ipdb trace
1 file changed with 0 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/validators.py
Show inline comments
 
@@ -500,31 +500,24 @@ def CanCreateGroup(can_create_in_root=Fa
 
        messages = {
 
            'permission_denied': _(u"You don't have permissions "
 
                                   "to create a group in this location")
 
        }
 

	
 
        def to_python(self, value, state):
 
            #root location
 
            if value in [-1, "-1"]:
 
                return None
 
            return value
 

	
 
        def validate_python(self, value, state):
 
            #TODO: REMOVE THIS !!
 
            ################################
 
            import ipdb;ipdb.set_trace()
 
            print 'setting ipdb debuggin for rhodecode.model.validators._validator.validate_python'
 
            ################################
 
            
 

	
 
            gr = RepoGroup.get(value)
 
            gr_name = gr.group_name if gr else None  # None means ROOT location
 

	
 
            if can_create_in_root and gr is None:
 
                #we can create in root, we're fine no validations required
 
                return
 

	
 
            forbidden_in_root = gr is None and can_create_in_root is False
 
            val = HasReposGroupPermissionAny('group.admin')
 
            forbidden = not val(gr_name, 'can create group validator')
 
            if forbidden_in_root or forbidden:
 
                msg = M(self, 'permission_denied', state)
0 comments (0 inline, 0 general)