Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gs_perm_edit

Edit an existing permission


Description

Assign a new role to an existing user permission. This function is useful when you want to change roles for an entity, e.g., from "writer" to "reader" or vice versa.

Usage

gs_perm_edit(ss, email = NULL, perm_id = NULL, role = "reader",
  commenter = FALSE, verbose = TRUE)

Arguments

ss

a registered Google spreadsheet, i.e. a googlesheet object

email

The email address or domain name for the entity.

perm_id

The ID for the permission.

role

The primary role for this user. Allowed values are "owner", "reader", and "writer".

commenter

logical; allow the user to comment? This is only effective if role = "reader".

verbose

logical; do you want informative messages?

Examples

## Not run: 
foo <- gs_new("foo")
gs_perm_ls(foo)
# Add anyone as a reader:
gs_perm_add(foo, type = "anyone", role = "reader")
gs_perm_ls(foo)
# Change anyone to a writer:
gs_perm_edit(foo, perm_id = "anyoneWithLink", role = "writer")
gs_perm_ls(foo)
gs_delete(foo)

## End(Not run)

googlesheets

Manage Google Spreadsheets from R

v0.3.0
MIT + file LICENSE
Authors
Jennifer Bryan [aut, cre], Joanna Zhao [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.