|  | @@ -110,17 +110,21 @@ func (p Perms) Get(s string, u User) (mo.D, bool) {
 | 
	
		
			
				|  |  |  	return perms, true
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -func (p Perms) GetAll(s []string, u User) (mo.D, bool) {
 | 
	
		
			
				|  |  | +func (p Perms) GetAll(s []string, u User) (mo.Pipeline, bool) {
 | 
	
		
			
				|  |  |  	if len(s) == 0 {
 | 
	
		
			
				|  |  |  		return nil, false
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | -	perm := make(mo.D, 0, len(s))
 | 
	
		
			
				|  |  | +	perm := make(mo.Pipeline, 0, len(s))
 | 
	
		
			
				|  |  |  	for _, sp := range s {
 | 
	
		
			
				|  |  |  		cond, ok := p.Get(sp, u)
 | 
	
		
			
				|  |  |  		if !ok {
 | 
	
		
			
				|  |  |  			return nil, false
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		perm = append(perm, cond...)
 | 
	
		
			
				|  |  | +		if i, _, o := mo.HasOperator(perm, cond[0].Key); o {
 | 
	
		
			
				|  |  | +			perm[i] = append(perm[i], cond...)
 | 
	
		
			
				|  |  | +		} else {
 | 
	
		
			
				|  |  | +			perm = append(perm, cond)
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	return perm, true
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -215,7 +219,7 @@ func (d Database) GetOtherPerms(name Name) []string {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  type Permission interface {
 | 
	
		
			
				|  |  | -	Has(name Name, u User) (mo.D, bool)
 | 
	
		
			
				|  |  | +	Has(name Name, u User) (mo.Pipeline, bool)
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  type PermsConfig struct {
 | 
	
	
		
			
				|  | @@ -225,7 +229,7 @@ type PermsConfig struct {
 | 
	
		
			
				|  |  |  	Database Database `json:"database"`
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -func (p *PermsConfig) Has(name Name, u User) (mo.D, bool) {
 | 
	
		
			
				|  |  | +func (p *PermsConfig) Has(name Name, u User) (mo.Pipeline, bool) {
 | 
	
		
			
				|  |  |  	if u.IsSysadmin() {
 | 
	
		
			
				|  |  |  		return nil, true
 | 
	
		
			
				|  |  |  	}
 |