Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 61c8867742 |
@@ -185,16 +185,15 @@ func (s *nodeServiceImpl) getPermContext() (*permContext, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// User and namespace nodes are globally readable (they represent identities,
|
||||
// User nodes are globally readable (they represent identities,
|
||||
// and anyone can reference or assign to them).
|
||||
for _, nodeType := range []string{"user", "namespace"} {
|
||||
nodes, _ := s.store.FindNodes([]*models.Rel{{Type: models.RelType("_type::" + nodeType), Target: ""}})
|
||||
// Namespace nodes are NOT globally readable; access must be explicitly granted.
|
||||
nodes, _ := s.store.FindNodes([]*models.Rel{{Type: "_type::user", Target: ""}})
|
||||
for _, n := range nodes {
|
||||
if pc.levels[n.ID] < permRead {
|
||||
pc.levels[n.ID] = permRead
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pc, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user