mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 14:31:02 +00:00 
			
		
		
		
	- Massive replacement of changing `code.gitea.io/gitea` to `forgejo.org`. - Resolves forgejo/discussions#258 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7337 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Beowulf <beowulf@beocode.eu> Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			553 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			553 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2022 The Gitea Authors. All rights reserved.
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| package auth
 | |
| 
 | |
| import (
 | |
| 	"forgejo.org/modules/json"
 | |
| 	"forgejo.org/modules/log"
 | |
| )
 | |
| 
 | |
| func UnmarshalGroupTeamMapping(raw string) (map[string]map[string][]string, error) {
 | |
| 	groupTeamMapping := make(map[string]map[string][]string)
 | |
| 	if raw == "" {
 | |
| 		return groupTeamMapping, nil
 | |
| 	}
 | |
| 	err := json.Unmarshal([]byte(raw), &groupTeamMapping)
 | |
| 	if err != nil {
 | |
| 		log.Error("Failed to unmarshal group team mapping: %v", err)
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return groupTeamMapping, nil
 | |
| }
 |