mirror of
				https://github.com/dani-garcia/vaultwarden.git
				synced 2025-10-30 21:31:13 +00:00 
			
		
		
		
	Fix Single Org Policy check (#4207)
There was an error in the single org policy check to determine how many users there are in an org. The `or` check was at the wrong location in the DSL. This is now fixed. Fixes #4205
This commit is contained in:
		
					parent
					
						
							
								c5665e7b77
							
						
					
				
			
			
				commit
				
					
						76a3f0f531
					
				
			
		
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -648,8 +648,7 @@ impl UserOrganization { | |||
|         db_run! { conn: { | ||||
|             users_organizations::table | ||||
|                 .filter(users_organizations::user_uuid.eq(user_uuid)) | ||||
|                 .filter(users_organizations::status.eq(UserOrgStatus::Accepted as i32)) | ||||
|                 .or_filter(users_organizations::status.eq(UserOrgStatus::Confirmed as i32)) | ||||
|                 .filter(users_organizations::status.eq(UserOrgStatus::Accepted as i32).or(users_organizations::status.eq(UserOrgStatus::Confirmed as i32))) | ||||
|                 .count() | ||||
|                 .first::<i64>(conn) | ||||
|                 .unwrap_or(0) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue