set_public_read_all_versions: Set public READ access on all versions of PIDs in data...

View source: R/util.R

set_public_read_all_versionsR Documentation

Set public READ access on all versions of PIDs in data package.

Description

Set public READ access on all versions of PIDs in data package.

Usage

set_public_read_all_versions(mn, resource_map_pid)

Arguments

mn

(MNode) The Member Node to query.

resource_map_pid

(character) The resource map identifier (PID).

Examples

## Not run: 
cn_staging <- CNode('STAGING')
adc_test <- getMNode(cn_staging,'urn:node:mnTestARCTIC')
# Create a dummy package then create another version with 'publish_update()'
pkg <- create_dummy_package(adc_test)
remove_public_read(mn, unlist(pkg))
pkg_v2 <- publish_update(adc_test, pkg$metadata, pkg$resource_map, pkg$data, public = FALSE)
# Set public read on all versions
set_public_read_all_versions(adc_test, pkg$resource_map)

## End(Not run)

NCEAS/arcticdatautils documentation built on Aug. 28, 2023, 12:10 p.m.