ToolQuerySet(model=None, query=None, using=None)¶
Performs the query and returns a single object matching the given keyword arguments.
Manages Tool models.
Any get() operations performed (directly or indirectly through a ForeignKey) will go through a cache to attempt to minimize Tool lookups.
The Tool cache is never cleared, but as Tool objects should never be modified by hand (they’re registered when doing an rb-site upgrade, and then the server process must be reloaded), this shouldn’t be a problem.
Return a QuerySet for Tool models.
Returns: The new QuerySet instance. Return type: ToolQuerySet
A manager for Repository models.
accessible(user, visible_only=True, local_site=None, show_all_local_sites=False)¶
Return a queryset for repositories accessible by the given user.
For superusers, all public and private repositories will be returned.
For regular users, only repositories that are public or that the user is on the access lists for (directly or through a review group) will be returned.
For anonymous users, only public repositories will be returned.
The returned list is further filtered down based on the
- user (django.contrib.auth.models.User) – The user that must have access to any returned repositories.
- visible_only (bool, optional) – Whether only visible repositories should be returned.
- local_site (reviewboard.site.models.LocalSite, optional) – A specific Local Site that the repositories must be associated with. By default, this will only return repositories not part of a site.
- show_all_local_sites (bool, optional) – Whether repositories from all Local Sites should be
returned. This cannot be
local_siteargument was provided.
The resulting queryset.
Return IDs of repositories that are accessible by the given user.
accessible()and takes the same arguments.
The list of IDs.
list of int
Encrypts any stored plain-text passwords.