add_users: Add a user to the DataMuster MongoDB database.

View source: R/add_users.R

add_usersR Documentation

Add a user to the DataMuster MongoDB database.

Description

This function adds a user to the DataMuster MongoDB database. You can only access this function if you have read and write permissions.

Usage

add_users(
  user,
  email,
  accesslevel,
  writeaccess,
  property,
  username = NULL,
  password = NULL
)

Arguments

user

the name of the user to be added to the DataMuster MongoDB Altas server, preferably without a space between the first and last name

email

the email address of the user that was used to register via the DataMuster website

accesslevel

the MongoDB user access level, either "user" or "admin"

writeaccess

the MongoDB user write access level, either "1" for write access or "0" for no write access

property

a list of the properties the user will be able to access in MongoDB. If access is "admin", the user will be provided access to all existing properties in the database

username

if you don't have a username set up using the dmaccess function you can pass a username, if no value added then the function looks for a value from dmaccess via keyring

password

if you include a username you will also need to add a password contact Lauren O'Connor if you don't have access

Value

This function writes directly to the database. A message will appear to indicate the number of documents that have been successfully added to the MongoDB database

a message that indicates that the user has been successfully added

Author(s)

Lauren O'Connor l.r.oconnor@cqu.edu.au


PrecisionLivestockManagement/DMMongoDB documentation built on Aug. 22, 2023, 10:57 a.m.