2020-03-01 03:31:05 +03:00
|
|
|
:: metadata: helpers for getting data from the metadata-store
|
|
|
|
::
|
|
|
|
/- *metadata-store
|
|
|
|
::
|
|
|
|
|_ =bowl:gall
|
|
|
|
++ app-paths-from-group
|
|
|
|
|= [=app-name =group-path]
|
|
|
|
^- (list app-path)
|
|
|
|
%+ murn
|
|
|
|
%~ tap in
|
|
|
|
=- (~(gut by -) group-path ~)
|
2020-06-08 10:53:16 +03:00
|
|
|
.^ (jug ^group-path md-resource)
|
2020-03-01 03:31:05 +03:00
|
|
|
%gy
|
|
|
|
(scot %p our.bowl)
|
|
|
|
%metadata-store
|
|
|
|
(scot %da now.bowl)
|
|
|
|
/group-indices
|
|
|
|
==
|
2020-06-08 10:53:16 +03:00
|
|
|
|= =md-resource
|
2020-03-01 03:31:05 +03:00
|
|
|
^- (unit app-path)
|
2020-06-08 10:53:16 +03:00
|
|
|
?. =(app-name.md-resource app-name) ~
|
|
|
|
`app-path.md-resource
|
2020-03-01 03:31:05 +03:00
|
|
|
::
|
|
|
|
++ groups-from-resource
|
2020-06-08 10:53:16 +03:00
|
|
|
|= =md-resource
|
2020-03-01 03:31:05 +03:00
|
|
|
^- (list group-path)
|
|
|
|
=; resources
|
|
|
|
%~ tap in
|
|
|
|
%+ ~(gut by resources)
|
2020-06-08 10:53:16 +03:00
|
|
|
md-resource
|
2020-03-01 03:31:05 +03:00
|
|
|
*(set group-path)
|
2020-06-08 10:53:16 +03:00
|
|
|
.^ (jug ^md-resource group-path)
|
2020-03-01 03:31:05 +03:00
|
|
|
%gy
|
|
|
|
(scot %p our.bowl)
|
|
|
|
%metadata-store
|
|
|
|
(scot %da now.bowl)
|
|
|
|
/resource-indices
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ check-resource-permissions
|
2020-06-08 10:53:16 +03:00
|
|
|
|= [=ship =md-resource]
|
2020-03-01 03:31:05 +03:00
|
|
|
^- ?
|
2020-06-08 10:53:16 +03:00
|
|
|
%+ lien (groups-from-resource md-resource)
|
2020-03-01 03:31:05 +03:00
|
|
|
|= =group-path
|
|
|
|
.^ ?
|
|
|
|
%gx
|
|
|
|
(scot %p our.bowl)
|
|
|
|
%permission-store
|
|
|
|
(scot %da now.bowl)
|
|
|
|
%permitted
|
|
|
|
(scot %p ship)
|
|
|
|
(snoc group-path %noun)
|
|
|
|
==
|
2020-06-08 10:53:16 +03:00
|
|
|
--
|