-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creation of new projects is now an administrator task.
Uploads can only be performed to existing projects. This aligns with the gypsum philosophy and is necessary to have more control over disk usage.
- Loading branch information
Showing
53 changed files
with
295 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#' Create a project | ||
#' | ||
#' Create a new project in the registry. | ||
#' | ||
#' @param project String containing the project to remove. | ||
#' @param owners Character vector containing the user IDs for owners of this project. | ||
#' This defaults to the current user. | ||
#' @param uploaders List specifying the authorized uploaders for this project. | ||
#' See the \code{uploaders} field in the \code{\link{fetchPermissions}} return value for the expected format. | ||
#' @param staging String containing the path to the staging directory. | ||
#' | ||
#' @return \code{NULL} is invisibly returned if the project was successfully created. | ||
#' | ||
#' @author Aaron Lun | ||
#' | ||
#' @seealso | ||
#' \code{\link{uploadDirectory}}, to upload a new version of an asset to an existing project. | ||
#' | ||
#' \code{\link{removeProject}}, to remove a project respectively. | ||
#' | ||
#' @examples | ||
#' info <- startGobbler() | ||
#' removeProject("test", staging=info$staging) # start with a clean slate. | ||
#' | ||
#' # Creating our new project. | ||
#' createProject("test", staging=info$staging) | ||
#' listProjects(registry=info$registry) | ||
#' | ||
#' @export | ||
createProject <- function(project, staging, owners=NULL, uploaders=NULL) { | ||
req <- list(project=project) | ||
|
||
permissions <- list() | ||
if (!is.null(owners)) { | ||
permissions$owners <- as.list(owners) | ||
} | ||
if (!is.null(uploaders)) { | ||
permissions$uploaders <- sanitize_uploaders(uploaders) | ||
} | ||
if (length(permissions)) { | ||
req$permissions <- permissions | ||
} | ||
|
||
chosen <- dump_request(staging, "create_project", req) | ||
wait_response(staging, chosen) | ||
invisible(NULL) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.