mirror of
https://github.com/safing/portbase
synced 2025-04-18 00:19:09 +00:00
Review related changes
This commit is contained in:
parent
1b55c73559
commit
0464f5be48
2 changed files with 10 additions and 6 deletions
|
@ -70,7 +70,7 @@ func (mng *Manager) Start() error {
|
|||
configKeyPrefixes[sub.ConfigKeySpace] = sub
|
||||
}
|
||||
|
||||
// aggmngate all modules dependencies (and the subsystem module itself)
|
||||
// aggregate all modules dependencies (and the subsystem module itself)
|
||||
// into the Modules slice. Configuration options form dependened modules
|
||||
// will be marked using config.SubsystemAnnotation if not already set.
|
||||
for _, sub := range mng.subsys {
|
||||
|
|
|
@ -216,14 +216,18 @@ func (r *Registry) Query(q *query.Query, local, internal bool) (*iterator.Iterat
|
|||
for _, r := range records {
|
||||
r.Lock()
|
||||
var (
|
||||
matchesKey = q.MatchesKey(r.DatabaseKey())
|
||||
isValid = r.Meta().CheckValidity()
|
||||
isAllowed = r.Meta().CheckPermission(local, internal)
|
||||
matchesRecord = q.MatchesRecord(r)
|
||||
matchesKey = q.MatchesKey(r.DatabaseKey())
|
||||
isValid = r.Meta().CheckValidity()
|
||||
isAllowed = r.Meta().CheckPermission(local, internal)
|
||||
|
||||
allowed = matchesKey && isValid && isAllowed
|
||||
)
|
||||
if allowed {
|
||||
allowed = q.MatchesRecord(r)
|
||||
}
|
||||
r.Unlock()
|
||||
|
||||
if !(matchesKey && isValid && isAllowed && matchesRecord) {
|
||||
if !allowed {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue