Move CapabilityControl onto CurrentUser
This makes it easier to ask what is the current user permitted to perform, given the system's access controls. The limits are needed not just for query size, but also other fine-grained permissions. Change-Id: Ic767eb9184acce34e435629a00b037245e6ea607
This commit is contained in:
		@@ -17,20 +17,19 @@ 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.server.account.CapabilityControl;
 | 
			
		||||
import com.google.gerrit.server.config.AuthConfig;
 | 
			
		||||
import com.google.inject.Inject;
 | 
			
		||||
import com.google.inject.Singleton;
 | 
			
		||||
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
/** An anonymous user who has not yet authenticated. */
 | 
			
		||||
@Singleton
 | 
			
		||||
public class AnonymousUser extends CurrentUser {
 | 
			
		||||
  @Inject
 | 
			
		||||
  AnonymousUser(final AuthConfig auth) {
 | 
			
		||||
    super(AccessPath.UNKNOWN, auth);
 | 
			
		||||
  AnonymousUser(CapabilityControl.Factory capabilityControlFactory, AuthConfig auth) {
 | 
			
		||||
    super(capabilityControlFactory, AccessPath.UNKNOWN, auth);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user