Un-documented exports of functions to get things working
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
#' @export
|
||||
group_id <- function(name, ...) {
|
||||
checkmate::assert_string(name)
|
||||
conn_ref <- modb_conn_ref(args = list(...))
|
||||
@@ -6,9 +7,11 @@ group_id <- function(name, ...) {
|
||||
res <- .Call(c_rmodb_groupId, conn_ref, name)
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
group_exists <- function(name, ...) {
|
||||
return(!is.na(group_id(name)))
|
||||
}
|
||||
#' @export
|
||||
group_create <- function(name, id = NULL, ...) {
|
||||
checkmate::assert_string(name)
|
||||
if (!checkmate::test_null(id)) {
|
||||
@@ -21,6 +24,7 @@ group_create <- function(name, id = NULL, ...) {
|
||||
res <- .Call(c_rmodb_createGroup, conn_ref, as.integer(id), name)
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
group_delete <- function(id, ...) {
|
||||
checkmate::assert_int(id)
|
||||
conn_ref <- modb_conn_ref(args = list(...))
|
||||
@@ -28,6 +32,7 @@ group_delete <- function(id, ...) {
|
||||
res <- .Call(c_rmodb_deleteGroup, conn_ref, as.integer(id))
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
group <- function(id, withMembers = TRUE, ...) {
|
||||
checkmate::assert_int(id)
|
||||
checkmate::assert_logical(withMembers)
|
||||
@@ -36,6 +41,7 @@ group <- function(id, withMembers = TRUE, ...) {
|
||||
res <- .Call(c_rmodb_group, conn_ref, as.integer(id), as.logical(withMembers))
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
groups <- function(withMembers = FALSE, withDeleted = FALSE, ...)
|
||||
{
|
||||
checkmate::assert_logical(withMembers)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
#' @export
|
||||
link_user_group <- function(user, group, ...) {
|
||||
conn_ref <- modb_conn_ref(args = list(...))
|
||||
if (checkmate::test_list(user)) {
|
||||
@@ -21,6 +22,7 @@ link_user_group <- function(user, group, ...) {
|
||||
return(res)
|
||||
}
|
||||
|
||||
#' @export
|
||||
unlink_user_group <- function(user, group, ...) {
|
||||
conn_ref <- modb_conn_ref(args = list(...))
|
||||
if (checkmate::test_list(user)) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
#' @export
|
||||
user_id <- function(name, ...) {
|
||||
checkmate::assert_string(name)
|
||||
conn_ref <- modb_conn_ref(args = list(...))
|
||||
@@ -6,9 +7,11 @@ user_id <- function(name, ...) {
|
||||
res <- .Call(c_rmodb_userId, conn_ref, name)
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
user_exists <- function(name, ...) {
|
||||
return(!is.na(user_id(name)))
|
||||
}
|
||||
#' @export
|
||||
user_create <- function(name, email, id = NULL, ...) {
|
||||
checkmate::assert_string(name)
|
||||
checkmate::assert_string(email)
|
||||
@@ -22,6 +25,7 @@ user_create <- function(name, email, id = NULL, ...) {
|
||||
res <- .Call(c_rmodb_createUser, conn_ref, as.integer(id), name, email)
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
user_delete <- function(id, ...) {
|
||||
checkmate::assert_int(id)
|
||||
conn_ref <- modb_conn_ref(args = list(...))
|
||||
@@ -29,6 +33,7 @@ user_delete <- function(id, ...) {
|
||||
res <- .Call(c_rmodb_deleteUser, conn_ref, as.integer(id))
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
user <- function(id, withGroups = TRUE, ...) {
|
||||
checkmate::assert_int(id)
|
||||
checkmate::assert_logical(withGroups)
|
||||
@@ -38,6 +43,7 @@ user <- function(id, withGroups = TRUE, ...) {
|
||||
|
||||
return(res)
|
||||
}
|
||||
#' @export
|
||||
users <- function(withGroups = FALSE, withDeleted = FALSE, ...)
|
||||
{
|
||||
checkmate::assert_logical(withGroups)
|
||||
|
||||
Reference in New Issue
Block a user