Revamp Profile Domains and Ports to Endpoints and ServiceEndpoints

This commit is contained in:
Daniel
2019-01-17 10:55:06 +01:00
parent 4017de7dac
commit bde81d815d
13 changed files with 417 additions and 249 deletions

View File

@@ -35,12 +35,20 @@ func updateListener(sub *database.Subscription) {
continue
}
switch profile.ID {
case "global":
switch profile.DatabaseKey() {
case "profiles/special/global":
specialProfileLock.Lock()
globalProfile = profile
specialProfileLock.Unlock()
case "fallback":
case "profiles/special/fallback":
profile.Lock()
if ensureServiceEndpointsDenyAll(profile) {
profile.Unlock()
profile.Save(SpecialNamespace)
continue
}
profile.Unlock()
specialProfileLock.Lock()
fallbackProfile = profile
specialProfileLock.Unlock()