ItemGroupPermissions
objects describe the owning group of an Item
, and its permissions on the item.group
property of the associated Item
.
name
String
let recipes = here.file('recipes.md');
recipes.group.name = 'staff';
id
Number
const recipes = here.file('recipes.md');
let ingredients = here.file('ingredients.md');
ingredients.group.id = recipes.group.id;
canRead
Boolean
const recipes = here.file('recipes.md');
recipes.group.canRead = true;
canWrite
Boolean
const recipes = here.file('recipes.md');
recipes.group.canWrite = true;
canExecute
Boolean
const recipes = here.file('recipes.md');
recipes.group.canExecute = true;
self
set(Object values)
key
-value
couple in values, sets the key
attribute of the ItemGroupPermissions
to value
. This makes it easy to set multiple attributes on the object at once.values |
A map of property names and values.
|
let scriptPermissions = here.file('script.js').group;
scriptPermissions.set({
canWrite: false,
canExecute: true
});
return scriptPermissions.canWrite; // returns `false`