mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			v2.0.0-bet
			...
			v2.0.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					c54267f50d | ||
| 
						 | 
					4de12ce5c1 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -12,3 +12,4 @@ users.txt
 | 
			
		||||
 | 
			
		||||
# secret test file
 | 
			
		||||
secret.txt
 | 
			
		||||
secret_oauth.txt
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
v2.0.0
 | 
			
		||||
v2.0.1
 | 
			
		||||
@@ -73,7 +73,6 @@ func (hooks *Hooks) UseUserContext(c *gin.Context) types.UserContext {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	log.Error().Msg("Provider does not exist")
 | 
			
		||||
	return types.UserContext{
 | 
			
		||||
		Username:   "",
 | 
			
		||||
		IsLoggedIn: false,
 | 
			
		||||
 
 | 
			
		||||
@@ -77,7 +77,7 @@ func ParseFileToLine(content string) string {
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		users = append(users, line)
 | 
			
		||||
		users = append(users, strings.TrimSpace(line))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return strings.Join(users, ",")
 | 
			
		||||
@@ -122,7 +122,9 @@ func GetUsers(env string, file string) (types.Users, error) {
 | 
			
		||||
 | 
			
		||||
		if fileErr == nil {
 | 
			
		||||
			log.Debug().Str("users", ParseFileToLine(fileContents)).Msg("Using users from file")
 | 
			
		||||
			if users != "" {
 | 
			
		||||
				users += ","
 | 
			
		||||
			}
 | 
			
		||||
			users += ParseFileToLine(fileContents)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user