mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Implement authorization support
This commit is contained in:
@@ -55,6 +55,14 @@ func (c *Config) IsUserExists(username string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *Config) GetKey(accessKey string) User {
|
||||
value, ok := c.Users[accessKey]
|
||||
if !ok {
|
||||
return User{}
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
func (c *Config) GetUser(username string) User {
|
||||
for _, user := range c.Users {
|
||||
if user.Name == username {
|
||||
|
||||
Reference in New Issue
Block a user