Make it possible to run a single test.

In such cases, have the output shown directly rather than
being output to a file & shown tailed.
Modify internal signature to be more flexible.

It's conceivable that we'd want to be able to ask whether an
arbitrary user is in a group, not just the current one.

Change-Id: Ib0a49706e6a3b5f89520e2a77f3111456e842851
Break out helper function so it can be re-used.

I want to be able to use the search functionality as part
of the read-only teams (#1178) feature, for which most of
the search logic can be re-used.

Change-Id: I001591b2e48909ad5ef949d7a3c2e4367d80e529
Ensure correct statics are output if the combined cache fails.

Previously, if the combination static failed to be written (either
updated or created) for some reason, this failure was silent. In
the case of a failed update, this was very hard to diagnose since
much of the frontend appeared to work.

We now fall back to outputting the direct links if the cache fails
for any reason.
Merge branch 'master' of git://srobo.org/cyanide
Add lazy-fetch of the IDE user's LDAP connection.

It's already potentially being created twice, and I'm about to
add another usage, so it seems suitable to combine these now.

Change-Id: I90f76050af429c2ee564f2d35f5e7c683ba1beb4
Let some project ops be disabled for readonly projects.

Add an isWrite flag to all operations, and use this to determine
whether or not the links should be disabled & their actions blocked.
Introduce new styling for the former and a new wrapping handler
for the latter.

Change-Id: Ib4424edd84e862d052e85e4ebf95b753e2db3e06
Replace redundant border with margin.

The background here is already white, so having a specific
coloured border just makes changing that harder. Replacing
it with a margin of the same width should preserve the visual
effect, while adding transparency.

Change-Id: I2713a27c632dafe86489b329e25f2526ceadb9ed
Disable project write options when the team is readonly.

At the moment, only entire teams are read-only, so use
this to mark all project things read-only too.

Change-Id: If1342aa9b996312a605a3255174885421aca5c8d
Add a highlight to the project page when read-only.

This visual marker (a light yellow background) makes it
nice and clear to the user that something's different about
the current project.

Change-Id: I87751d3f38a251e1ec37ecf2ff0c062e8cfed852
Add suuport for read-only file viewing.

Add a read-only flag to the edit tab's construction and used this
to provide a background highlight to the ACE box as well as marking
the editor read-only and disabling the save/diff buttons (the latter
doesn't make sense as changes can't be made).

Change-Id: I54cc8c3c37925f7736b9f04d1d39209da91d3354
Disable log based revert if the project is read-only.

Change-Id: I2627bff2fdc34120054ea7d39564e81c44d364f9
Add support for more logging levels.
Add initial support for read-only teams.

This adds the underlying provision for the existence of read-only
teams, and exposes these to the front-end as part of the user/info
endpoint. There is, however, no checking at this point to prevent
the user from actually writing to a read-only team (this will follow
shortly).

Change-Id: I27d622a92bcd969f866c4fe2058e3b4ddbf8191e
Add read-only checks to the backend.

This prevents any callers from using the backend directly to make
any changes to all parts of a team that they shouldn't have access
to. This includes their projects, files & team status.

Add a helper method to the AuthBackend which provides an exception
in the case that the team isn't writable.

Change-Id: I00c57625070dc94d152889921020890436fe0d58
Fix test by hiding read-only teams.

This test doesn't want to care about these.

Change-Id: I68a90bcbd88402a99099217e03528e42ffc862ee
Mark Team Status read-only if needed.

Disable image selection, make the fields read-only & add
the yellow background highlight if the team is read-only.

Change-Id: Ib1361087b4062e9dfb1f6ac944b696fd891da21e
Improve wrong exception error message.

If you get a different exception than what you were expecting
then it's useful to have as much information as possible. To that
end, now also include the message from the actual exception.

Change-Id: I1323fcdf051fd26e162ef6cf850bc28d098cf6e8
Fix #1178: Add read-only teams.

This merges a series of changes which modify both the front- and back-
ends to allow for the idea that a team is read-only. In the case of the
front-end, where suitable, it allows for an even more granular approach,
so that read-only projects could be added later if desired.

At the moment, the read-only access to a team is granted either via a
config option as part of the single auth mechanism, or via membership
of a specific LDAP group (combined with a general lookup of all teams
in LDAP matching the existing pattern).
Ensure an empty read_all_group behaves correctly.

When this config option is not present, then no-one can possibly
be in the read-all group, so ensure that this is handled correctly
without bothering to ask LDAP.

Change-Id: I394f90cea5156711038749b8722308bded0fdb3b