Jump to >

This documentation covers the in-development release of Review Board. You can see the latest stable docs or all previous versions.

reviewboard.hostingsvcs.models

class HostingServiceAccount(id, service_name, hosting_url, username, data, visible, local_site)[source]

Bases: django.db.models.base.Model

service_name[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

hosting_url[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

username[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

data[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

visible[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

local_site[source]

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

objects = <reviewboard.hostingsvcs.managers.HostingServiceAccountManager object>[source]
__str__()[source]

Return str(self).

property service[source]
property is_authorized[source]
is_accessible_by(user)[source]

Returns whether or not the user has access to the account.

The account is accessible by the user if the user has access to the local site.

is_mutable_by(user)[source]

Returns whether or not the user can modify or delete the account.

The account is mutable by the user if the user is an administrator with proper permissions or the account is part of a LocalSite and the user has permissions to modify it.

accept_certificate(certificate)[source]

Accept the SSL certificate for the linked hosting URL.

Parameters

certificate (reviewboard.scmtools.certs.Certificate) – The certificate to accept.

Raises

ValueError – The certificate data did not include required fields.

__annotations__ = {}
get_data_json()
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

local_site_id
repositories

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

set_data_json(json)