Commit 5562cd0e authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Strip entitlements of the group-authority

parent 32c650e3
......@@ -8,6 +8,7 @@ import (
"log"
"net/http"
"os"
"regexp"
"time"
"gopkg.in/alecthomas/kingpin.v2"
......@@ -208,6 +209,16 @@ func getConfig(configFile string) (c config, err error) {
return
}
// strip the group authority from entitlement names
nameExtractor := regexp.MustCompile("^(.*?)#")
for entName, entServices := range c.EntitlementToServices {
match := nameExtractor.FindStringSubmatch(entName)
if len(match) == 2 {
delete(c.EntitlementToServices, entName)
c.EntitlementToServices[match[1]] = entServices
}
}
c.Log("Groups: %s", c.GroupToServices)
c.Log("Entitlements: %s", c.EntitlementToServices)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment