forked from open-webui/open-webui
		
	feat: super-admin (first one to signup)
This commit is contained in:
		
							parent
							
								
									a433315346
								
							
						
					
					
						commit
						68cfccedee
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		|  | @ -58,7 +58,7 @@ async def update_user_permissions( | |||
| @router.post("/update/role", response_model=Optional[UserModel]) | ||||
| async def update_user_role(form_data: UserRoleUpdateForm, user=Depends(get_admin_user)): | ||||
| 
 | ||||
|     if user.id != form_data.id: | ||||
|     if user.id != form_data.id and form_data.id != Users.get_first_user().id: | ||||
|         return Users.update_user_role_by_id(form_data.id, form_data.role) | ||||
| 
 | ||||
|     raise HTTPException( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek