mirror of
				https://git.anonymousland.org/anonymousland/synapse.git
				synced 2025-11-04 07:36:49 -05:00 
			
		
		
		
	Enable changing user type via users admin API (#11174)
Users admin API can now also modify user type in addition to allowing it to be set on user creation. Signed-off-by: Jason Robinson <jasonr@matrix.org> Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
This commit is contained in:
		
							parent
							
								
									c1510c97b5
								
							
						
					
					
						commit
						63cbdd8af0
					
				
					 5 changed files with 80 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -326,6 +326,9 @@ class UserRestServletV2(RestServlet):
 | 
			
		|||
                        target_user.to_string()
 | 
			
		||||
                    )
 | 
			
		||||
 | 
			
		||||
            if "user_type" in body:
 | 
			
		||||
                await self.store.set_user_type(target_user, user_type)
 | 
			
		||||
 | 
			
		||||
            user = await self.admin_handler.get_user(target_user)
 | 
			
		||||
            assert user is not None
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue