Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Posit Connect Sharing settings #791

Closed
craigcerto opened this issue Sep 27, 2023 · 3 comments
Closed

Setting Posit Connect Sharing settings #791

craigcerto opened this issue Sep 27, 2023 · 3 comments

Comments

@craigcerto
Copy link

Hi,

I am wondering if it's possible when using pin_upload to set by default the sharing settings for a Pin to be "Anyone - no login required" or "All users - login required"?

I have a process that uploads some log files to a Posit Connect pin board and would like everyone within the server to have download access to the log files without having to manually change the sharing settings for each pin.

Thank you!

@juliasilge
Copy link
Member

Yes! If your Posit Connect instance allows it, you can share a pin publicly by setting access_type = "all" when you write or upload:

library(pins)

board <- board_connect()
#> Connecting to Posit Connect 2023.07.0 at <https://colorado.posit.co/rsc>
board |> pin_write(
    1:10, 
    "snazzy-numbers", 
    type = "json", 
    access_type = "all"
)
#> Writing to pin 'julia.silge/snazzy-numbers'

path <- fs::path_temp("some-letters.txt")
readr::write_lines(sample(LETTERS, size = 20), path)
pin_upload(
    board, 
    paths = path, 
    name = "snazzy-letters", 
    access_type = "all"
)

Created on 2023-09-27 with reprex v2.0.2

These are now available publicly on our demo server, and I did not have to change the access through the UI:

The options here for access_type are one of c("acl", "logged_in", "all"), and you can read more in the docs.

@juliasilge
Copy link
Member

Let us know if you have further questions! 🙌

Copy link

github-actions bot commented Nov 2, 2023

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants