ACL: Create an Access Control List for an Parse object

Description Usage Arguments Details Value Examples

Description

An Access Control List determines who can read and write a particular object. In particular, it chooses whether there is public read or write access. The user could also choose to deny themselves write access.

Usage

1
ACL(public_read = TRUE, public_write = TRUE, owner_write = TRUE)

Arguments

public_read

whether anyone can read this object

public_write

whether anyone can modify this object

owner_write

whether the currently logged-in user can modify this object

Details

The user must be logged in to create an ACL object.

Value

An "ACL" object, which is a list containing permissions for the current user and/or the public ("*"). This object can be passed as an ACL = argument to parse_object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 

# save some scores from a game
parse_login("myaccount", "mypassword")

# public:
game_score <- parse_object("GameScore", score = 42)

# closed to public writing:
nowrite_acl <- ACL(public_write = FALSE)
game_score2 <- parse_object("GameScore", score = 43, ACL = nowrite_acl)

# closed to public reading or writing:
noread_acl <- ACL(public_read = FALSE, public_write = FALSE)
game_score3 <- parse_object("GameScore", score = 44, ACL = noread_acl)


## End(Not run)

dgrtwo/rparse documentation built on May 15, 2019, 7:28 a.m.