Add policy validation code more rigorous

This commit is contained in:
Harshavardhana
2015-02-17 13:23:13 -08:00
parent 7882c8c746
commit 980d229272
3 changed files with 121 additions and 3 deletions

View File

@@ -144,3 +144,17 @@ func (c *Config) ReadConfig() error {
c.Users = users
return nil
}
func Loadusers() map[string]User {
c := Config{}
c.SetupConfig()
c.ReadConfig()
return c.Users
}
func Loaduser(username string) User {
c := Config{}
c.SetupConfig()
c.ReadConfig()
return c.GetUser(username)
}