diff rhodecode/model/forms.py @ 2986:f8d827686e9a beta

fixed missing permission for being able to write to group on repository settings ref #468
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 06 Nov 2012 21:58:29 +0100
parents 029a40c58df7
children d3200c58764e
line wrap: on
line diff
--- a/rhodecode/model/forms.py	Mon Nov 05 01:04:15 2012 +0100
+++ b/rhodecode/model/forms.py	Tue Nov 06 21:58:29 2012 +0100
@@ -227,7 +227,8 @@
         repo_name = All(v.UnicodeString(strip=True, min=1, not_empty=True),
                         v.SlugifyName())
         description = v.UnicodeString(strip=True, min=1, not_empty=True)
-        repo_group = v.OneOf(repo_groups, hideList=True)
+        repo_group = All(v.CanWriteGroup(),
+                         v.OneOf(repo_groups, hideList=True))
         private = v.StringBoolean(if_missing=False)
         landing_rev = v.OneOf(landing_revs, hideList=True)
         chained_validators = [v.ValidRepoName(edit, old_data), v.ValidPerms(),