Mercurial > kallithea
diff rhodecode/model/forms.py @ 3629:802c94bdfc85 beta
#749 and #516 Removed dupliciting of repo settings for rhodecode admins and repo admins
- repo admin now is allowed the same set of operations as the rhodecode admin
- single logic for forms/validations/permissions
- fixes #805 update external repo via webinterface
-
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 28 Mar 2013 02:57:05 +0100 |
parents | c734686b3cf2 |
children | ff2ea58debb5 |
line wrap: on
line diff
--- a/rhodecode/model/forms.py Thu Mar 28 02:11:26 2013 +0100 +++ b/rhodecode/model/forms.py Thu Mar 28 02:57:05 2013 +0100 @@ -227,27 +227,6 @@ return _RepoFieldForm -def RepoSettingsForm(edit=False, old_data={}, supported_backends=BACKENDS.keys(), - repo_groups=[], landing_revs=[]): - class _RepoForm(formencode.Schema): - allow_extra_fields = True - filter_extra_fields = False - repo_name = All(v.UnicodeString(strip=True, min=1, not_empty=True), - v.SlugifyName()) - repo_group = All(v.CanWriteGroup(old_data), - v.OneOf(repo_groups, hideList=True)) - repo_description = v.UnicodeString(strip=True, min=1, not_empty=False) - repo_private = v.StringBoolean(if_missing=False) - repo_landing_rev = v.OneOf(landing_revs, hideList=True) - clone_uri = All(v.UnicodeString(strip=True, min=1, not_empty=False)) - - chained_validators = [v.ValidCloneUri(), - v.ValidRepoName(edit, old_data), - v.ValidPerms(), - v.ValidSettings()] - return _RepoForm - - def RepoForkForm(edit=False, old_data={}, supported_backends=BACKENDS.keys(), repo_groups=[], landing_revs=[]): class _RepoForkForm(formencode.Schema):