Allow watching specific branches or any other search query
Any valid search string is now a valid filter expression or a watched project. The only operator not supported here is the is:watched operator, because that creates a recursive call that would never succeed. The change turned out far bigger than it should be due to the request scope requirement for the query builder. We had to rearrange a lot of code to ensure we always have the request scope available in order to construct a query builder and execute the filter expressions. Bug: issue 492 Change-Id: I199d9b215e000c049279cd8e86e7a36386fee0fb Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -15,11 +15,12 @@
|
||||
package com.google.gerrit.server;
|
||||
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.AccountProjectWatch;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gerrit.server.config.AuthConfig;
|
||||
import com.google.inject.servlet.RequestScoped;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -60,8 +61,8 @@ public abstract class CurrentUser {
|
||||
/** Set of changes starred by this user. */
|
||||
public abstract Set<Change.Id> getStarredChanges();
|
||||
|
||||
/** Set of project that are watched by this user */
|
||||
public abstract Set<Project.NameKey> getWatchedProjects();
|
||||
/** Filters selecting changes the user wants to monitor. */
|
||||
public abstract Collection<AccountProjectWatch> getNotificationFilters();
|
||||
|
||||
/** Is the user a non-interactive user? */
|
||||
public boolean isBatchUser() {
|
||||
|
||||
Reference in New Issue
Block a user