Expand description
Scope helper
Scope matching rule, assuming item length is 4 :
| own_paths | scope_level | visit level 0 | visit level 1 | visit level 2 | visit level 3 |
|---|---|---|---|---|---|
| ‘’ | -1 | ‘’ | |||
| ‘’ | 0 | % | % | % | % |
| ‘’ | 1 | ‘’ | % | % | % |
| ‘’ | 2 | ‘’ | % | % | |
| ‘’ | 3 | ‘’ | % | ||
| ‘AAAA’ | -1 | AAAA | |||
| ‘AAAA’ | 0 | % | % | % | % |
| ‘AAAA’ | 1 | AAAA% | AAAA% | AAAA% | |
| ‘AAAA’ | 2 | AAAA% | AAAA% | ||
| ‘AAAA’ | 3 | AAAA% | |||
| ‘AAAA/BBBB’ | -1 | AAAA/BBBB | |||
| ‘AAAA/BBBB’ | 0 | % | % | % | % |
| ‘AAAA/BBBB’ | 1 | AAAA% | AAAA% | AAAA% | |
| ‘AAAA/BBBB’ | 2 | AAAA/BBBB% | AAAA/BBBB% | ||
| ‘AAAA/BBBB’ | 3 | AAAA/BBBB% | |||
| ‘AAAA/BBBB/CCCC’ | -1 | AAAA/BBBB/CCCC | |||
| ‘AAAA/BBBB/CCCC’ | 0 | % | % | % | % |
| ‘AAAA/BBBB/CCCC’ | 1 | AAAA% | AAAA% | AAAA% | |
| ‘AAAA/BBBB/CCCC’ | 2 | AAAA/BBBB% | AAAA/BBBB% | ||
| ‘AAAA/BBBB/CCCC’ | 3 | AAAA/BBBB/CCCC% |
Functions§
- check_
scope - Check scope Legality.
- check_
without_ owner_ and_ unsafe_ fill_ ctx - Check
ownerfield of the context and fill the context. - degrade_
own_ paths - Downgrade of own paths.
- get_
max_ level_ id_ by_ context - Get the max level id from the own paths in the context.
- get_
path_ item - Get the path entries at the specified level from the own paths.
- get_
pre_ paths - Get the previous path at the specified level from the own paths.
- get_
scope_ level_ by_ context - Get the scope level from the own paths in context.
- unsafe_
fill_ ctx - Fill the context.
- unsafe_
fill_ groups_ only - Fill the
groupfield of the context. - unsafe_
fill_ own_ paths_ only - Fill the
own_pathsfield of the context. - unsafe_
fill_ owner_ only - Fill the
ownerfield of the context. - unsafe_
fill_ roles_ only - Fill the
rolesfield of the context.