ItemUserPermissions objects describe the owning user of an Item, and their permissions on the item.user property of the associated Item.
name
String
let recipes = here.file('recipes.md');
recipes.user.name = 'cykelero';
id
Number
const recipes = here.file('recipes.md');
let ingredients = here.file('ingredients.md');
ingredients.user.id = recipes.user.id;
canRead
Boolean
const recipes = here.file('recipes.md');
recipes.user.canRead = true;
canWrite
Boolean
const recipes = here.file('recipes.md');
recipes.user.canWrite = true;
canExecute
Boolean
const recipes = here.file('recipes.md');
recipes.user.canExecute = true;
self
set(Object values)
key-value couple in values, sets the key attribute of the ItemUserPermissions 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').user;
scriptPermissions.set({
canWrite: false,
canExecute: true
});
return scriptPermissions.canWrite; // returns `false`