Don't hyperlink non-internal groups
When an external group (such as LDAP) is used in a permission rule, don't attempt to link to the group in the internal account system UI. The group won't load successfully. Instead just display the name and put the UUID into a tooltip to show the full DN. Change-Id: I8fbb67a36da5d5fcb69b4f90bfedbc2638896886
This commit is contained in:
@@ -79,6 +79,12 @@ public final class AccountGroup {
|
||||
}
|
||||
}
|
||||
|
||||
/** @return true if the UUID is for a group managed within Gerrit. */
|
||||
public static boolean isInternalGroup(AccountGroup.UUID uuid) {
|
||||
return uuid.get().startsWith("global:")
|
||||
|| uuid.get().matches("[0-9a-f]{40}");
|
||||
}
|
||||
|
||||
/** Synthetic key to link to within the database */
|
||||
public static class Id extends IntKey<com.google.gwtorm.client.Key<?>> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
Reference in New Issue
Block a user