Create two magical groups 'Anonymous Users' and 'Registered Users'

These groups represent everyone on Gerrit.  Anonymous users is used for
a user account when they are not yet signed in to the site.  Registered
users are used for any account which is signed in.

Like the admin group, these groups are blessed by being marked in the
system config table as the special groups.  Since their membership is
managed automatically by Gerrit we do not permit a group owner to edit
the membership list in the web UI.  We also don't show the membership,
as the membership isn't stored in the database, its computed on the fly
under the assumption that everyone is in either group if they have an
Account.Id assigned.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-01-03 12:00:46 -08:00
parent 8612a50c29
commit a76796b3c6
7 changed files with 128 additions and 15 deletions

View File

@@ -91,6 +91,14 @@ public final class SystemConfig {
@Column
public AccountGroup.Id adminGroupId;
/** Identity of the anonymous group, which permits anyone. */
@Column
public AccountGroup.Id anonymousGroupId;
/** Identity of the registered users group, which permits anyone. */
@Column
public AccountGroup.Id registeredGroupId;
protected SystemConfig() {
}
}