| ocsApiUserProvisioningManager {ocs4R} | R Documentation |
ocsApiUserProvisioningManager
Description
ocsApiUserProvisioningManager
Format
R6Class object.
Value
Object of R6Class for modelling an ocsManager for Webdav API
General Methods (inherited from 'ocsManager')
new(url, user, pwd, logger, keyring_backend)-
This method is used to instantiate an ocsApiUserProvisioningManager. The user/pwd are mandatory in order to connect to 'ocs'
The logger can be either NULL, "INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs).
The
keyring_backendcan be set to use a different backend for storing the user password with keyring (Default value is 'env'). connect()-
A method to connect to 'ocs' and set version/capabilities
getVersion()-
Get the 'ocs' server version
getCapabilities()-
Get the 'ocs' server capabilities
User Provisioning API methods
addUser(userid, email, password, groups)-
Adds a user given a
userid(required). All other fields (email, password, groups) are optional for the user creation. ReturnsTRUEif the user is added,FALSEotherwise. getUsers()-
Get the list of users. This method returns a vector of class 'character' giving the user IDs available in the OCS cloud plateform.
getUser(userid, pretty)-
Get the user details from its
userid. If the argumentprettyis set to TRUE, this will return an object of classdata.frame, otherwise (by default) it returns an object of classlist. editUser(userid, key, value)-
Edits a user, identifier by a userid. The user property to be edited should be set using its key (eg display) and the value to be modified for this key. Returns
TRUEif the user is edited,FALSEotherwise. editUserDisplayName(userid, displayName)-
Edits a user display name.
editUserEmail(userid, email)-
Edits a user email.
editUserPassword(userid, password)-
Edits a user password.
editUserQuota(userid, quota)-
Edits a user quota.
enableUser(userid)-
Enables a user. Returns
TRUEif enabled. disableUser(userid)-
Disables a user. Returns
TRUEif disabled. deleteUser(userid)-
Deletes a user. Returns
TRUEif deleted. getUserGroups(userid)-
Get user group(s). This method returns a vector of class 'character' giving the usergroups IDs
- codeaddToGroup(userid, groupid)
-
Adds a user to a group.
removeFromGroup(userid, groupid)-
Removes a user from a group.
getGroups(search, limit, offset)-
Get the list of groups. This method returns a vector of class 'character' giving the usergroups IDs
getGroup(groupid)-
Get the group including member users from its
groupid. addGroup(groupid)-
Add group given a
groupid(required). deleteGroup(groupid)-
Deletes a group. Returns
TRUEif deleted.
Author(s)
Emmanuel Blondel <emmanuel.blondel1@gmail.com>