reviewboard.site.validation¶
-
validate_repositories
(form, field=u'repositories')[source]¶ Validate that the repositories all have valid, matching LocalSites.
This will compare the LocalSite associated with the form to that of each added Repository. Each Repository must have the same LocalSite that the form is using.
Parameters: - form (django.forms.Form) – The form to validate.
- field (unicode) – The name of the form field to validate.
Returns: The list of repositories.
Return type: list of reviewboard.scmtools.models.Repository
Raises: django.core.exceptions.ValidationError
– The selected groups contained ones which were not properly limited to the local site.
-
validate_review_groups
(form, field=u'review_groups')[source]¶ Validate that the review groups all have valid, matching LocalSites.
This will compare the LocalSite associated with the form to that of each added Group. Each Group must have the same LocalSite that the form is using.
Parameters: - form (django.forms.Form) – The form to validate.
- field (unicode) – The name of the form field to validate.
Returns: The list of groups.
Return type: list of reviewboard.reviews.models.group.Group
Raises: django.core.exceptions.ValidationError
– The selected groups contained ones which were not properly limited to the local site.
-
validate_users
(form, field=u'users')[source]¶ Validate that the users all have valid, matching LocalSites.
This will compare the LocalSite associated with the form to that of each added User. If the form has a LocalSite set, then all Users are required to be a part of that LocalSite. Otherwise, any User is allowed.
Parameters: - form (django.forms.Form) – The form to validate.
- field (unicode) – The name of the form field to validate.
Returns: The list of users.
Return type: list of django.contrib.auth.models.User
Raises: django.core.exceptions.ValidationError
– The selected users contained ones which were not properly limited to the local site.