I would like to write pins to my Posit Connect board with acl, by that I mean a list of specific users that get access.
I need to do this via code instead of Posit Connect GUI because I have thousands of pins (that get updated regularly).
The following code uploads mtcars as a pin to my Posit Connect board with access_type "logged_in" ("All users - login required").
library(pins)
board <- board_connect(auth = "envvar")
mtcars %>% pins::pin_write(board = board, name = "my_mtcars_pin",
force_identical_write = T, access_type = "logged_in")
Other options are "all" and "acl". With "acl" I would have to supply a list of users or groups. I don't know how to to that, I can't find any documentation on this. Could someone please provide me with an example? Thank you very much!
I wonder if I could use connectapi::get_acl_user() or connectapi::get_acl() for my purposes but for that I would need the GUID for the content item to be retrieved. The GUID is not provided with functions from the pins library (as far as I can tell).
I found a solution. Not sure if this is the best way to do it - probably not - but it does work at least.