Sharing

grant

Give a person, or anyone, viewer or editor access to an item

View as Markdown

Changes something.

Give a person, or anyone, viewer or editor access to an item.

Expects nothing: access is not content and has no revision of its own, so a revision sent with it is refused with unexpected_precondition. Name the person by an address their login provider has verified — they need no flie account yet, and the grant finds them at their first login — or grant to anyone, which is public to whoever holds the link and is a viewer and never an editor. A grant on a folder reaches everything in it, then and later, unless a folder between cuts inheritance. Nobody grants above their own access. Where a grant is already live for that subject its role is changed in place, and asking for the role already held changes nothing and records nothing.

Who may see the user's files is the user's decision and never an inference from the task: grant only when they say to, and name the role they named. The receipt carries the grant and not the link; the link tool is what answers that, before or after, and the link never changes.

This change takes a key you choose, fresh for this change. If its result never reaches you, call again with the same key and the same arguments, or ask the status tool with that key: the same key and the same input is one change, made once.

Arguments

ArgumentTypeRequiredMeaning
idtextyesThe folder or file to give access to
emailtextnoThe verified address of the person to grant to
anyoneflagnoGrant to anyone holding the link, as a viewer
roletextnoviewer or editor; the default is viewer
keytextyesA key you choose for this change, fresh each time; repeat it to settle a lost result

On the command line

flie agent grant ID [--to EMAIL] [--anyone] [--role ROLE] [--key OPERATION_KEY]
flie --json agent grant ID --to person@example.com --role viewer|editor
flie --json agent grant ID --anyone         # public to whoever holds the link; viewer only

On this page