mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
metadata-store: add permissions field
This commit is contained in:
parent
8541886433
commit
871fba20a3
@ -53,6 +53,13 @@
|
||||
?> ?=([%s *] jon)
|
||||
(rash p.jon hex)
|
||||
::
|
||||
++ permissions
|
||||
%- su
|
||||
;~ pose
|
||||
(tag %$)
|
||||
(tag %reader-comments)
|
||||
==
|
||||
::
|
||||
++ metadata
|
||||
%- ot
|
||||
:~ [%title so]
|
||||
@ -63,8 +70,11 @@
|
||||
[%module so]
|
||||
[%picture so]
|
||||
[%preview bo]
|
||||
[%permissions permissions]
|
||||
==
|
||||
::
|
||||
++ tag |*(a=@tas (cold a (jest a)))
|
||||
::
|
||||
++ md-resource
|
||||
^- $-(json ^md-resource)
|
||||
%- ot
|
||||
@ -86,6 +96,7 @@
|
||||
[%module s+module.met]
|
||||
[%picture s+picture.met]
|
||||
[%preview b+preview.met]
|
||||
[%permissions s+`@t`permissions.met]
|
||||
==
|
||||
::
|
||||
++ update-to-json
|
||||
|
@ -18,6 +18,17 @@
|
||||
::
|
||||
+$ color @ux
|
||||
+$ url @t
|
||||
::
|
||||
:: $permissions: tag identifying variation in permissions
|
||||
::
|
||||
:: This will be passed to the graph-permissions mark
|
||||
:: conversion to allow for custom permissions.
|
||||
::
|
||||
:: %reader-comments: Allow readers to comment, regardless
|
||||
:: of whether they can write.
|
||||
:: %$: No variation
|
||||
::
|
||||
+$ permissions ?(%reader-comments %$)
|
||||
+$ metadata
|
||||
$: title=cord
|
||||
description=cord
|
||||
@ -27,6 +38,7 @@
|
||||
module=term
|
||||
picture=url
|
||||
preview=?
|
||||
=permissions
|
||||
==
|
||||
::
|
||||
+$ metadata-action
|
||||
|
@ -22,7 +22,9 @@ export default class MetadataApi extends BaseApi<StoreState> {
|
||||
color,
|
||||
'date-created': dateCreated,
|
||||
creator,
|
||||
'module': moduleName
|
||||
'module': moduleName,
|
||||
preview: false,
|
||||
permissions: ''
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -62,4 +62,7 @@ export interface Metadata {
|
||||
module: string;
|
||||
url: string;
|
||||
preview: boolean;
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
export type Permissions = '' | 'reader-comments';
|
||||
|
Loading…
Reference in New Issue
Block a user