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