Fix oidc users reading
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		@@ -36,9 +36,9 @@ def get_users_inner():
 | 
			
		||||
    ret = api_instance.list_namespaced_custom_object("codemowers.cloud", "v1beta1", OIDC_USERS_NAMESPACE, "oidcusers")
 | 
			
		||||
    for item in ret["items"]:
 | 
			
		||||
        username = item['metadata']['name']
 | 
			
		||||
        display_name = item.get("spec", {}).get("customProfile", {}).get("name", None)
 | 
			
		||||
        slack_id = item.get("spec", {}).get("slackId", None)
 | 
			
		||||
        user_type = item.get("spec", {}).get("type", None)
 | 
			
		||||
        display_name = item.get("status", {}).get("profile", {}).get("name", None)
 | 
			
		||||
        slack_id = item.get("status", {}).get("slackId", None)
 | 
			
		||||
        user_type = item.get("spec", {}).get("type", None) #TODO: read from status when ready
 | 
			
		||||
        groups = []
 | 
			
		||||
        for group in item.get("status", {}).get("groups", []):
 | 
			
		||||
            groups.append(f"{group['prefix']}:{group['name']}")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user