comparison rhodecode/model/validators.py @ 3415:b8f929bff7e3 beta

fixed tests and missing replacements from 5f1850e4712a
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 27 Feb 2013 02:27:09 +0100
parents 157231a4fcb7
children 5706f6ab60cf
comparison
equal deleted inserted replaced
3414:25c670081761 3415:b8f929bff7e3
130 130
131 131
132 def ValidUsersGroup(edit=False, old_data={}): 132 def ValidUsersGroup(edit=False, old_data={}):
133 class _validator(formencode.validators.FancyValidator): 133 class _validator(formencode.validators.FancyValidator):
134 messages = { 134 messages = {
135 'invalid_group': _(u'Invalid users group name'), 135 'invalid_group': _(u'Invalid user group name'),
136 'group_exist': _(u'Users group "%(usersgroup)s" already exists'), 136 'group_exist': _(u'Users group "%(usersgroup)s" already exists'),
137 'invalid_usersgroup_name': 137 'invalid_usersgroup_name':
138 _(u'users group name may only contain alphanumeric ' 138 _(u'user group name may only contain alphanumeric '
139 'characters underscores, periods or dashes and must begin ' 139 'characters underscores, periods or dashes and must begin '
140 'with alphanumeric character') 140 'with alphanumeric character')
141 } 141 }
142 142
143 def validate_python(self, value, state): 143 def validate_python(self, value, state):
545 EMPTY_PERM = 'repository.none' 545 EMPTY_PERM = 'repository.none'
546 546
547 class _validator(formencode.validators.FancyValidator): 547 class _validator(formencode.validators.FancyValidator):
548 messages = { 548 messages = {
549 'perm_new_member_name': 549 'perm_new_member_name':
550 _(u'This username or users group name is not valid') 550 _(u'This username or user group name is not valid')
551 } 551 }
552 552
553 def to_python(self, value, state): 553 def to_python(self, value, state):
554 perms_update = OrderedSet() 554 perms_update = OrderedSet()
555 perms_new = OrderedSet() 555 perms_new = OrderedSet()