Jump to >


class LocalSite(*args, **kwargs)[source]

A division within a Review Board installation.

This allows the creation of independent, isolated divisions within a given server. Users can be designated as members of a LocalSite, and optionally as admins (which allows them to manipulate the repositories, groups and users in the site).

Pretty much every other model in this module can all be assigned to a single LocalSite, at which point only members will be able to see or manipulate these objects. Access control is performed at every level, and consistency is enforced through a liberal sprinkling of assertions and unit tests.


Returns whether or not the user has access to this LocalSite.

This checks that the user is logged in, and that they’re listed in the ‘users’ field.

is_mutable_by(user, perm='site.change_localsite')[source]

Returns whether or not a user can modify settings in a LocalSite.

This checks that the user is either staff with the proper permissions, or that they’re listed in the ‘admins’ field.

By default, this is checking whether the LocalSite itself can be modified, but a different permission can be passed to check for another object.