public class JSUserManager extends JSBaseScriptableObject
Modifier and Type | Field and Description |
---|---|
static JSMap |
myUserStatusMap
Map of the valid user status.
|
static JSMap |
myUserTypesMap
Map of the valid user types.
|
Constructor and Description |
---|
JSUserManager() |
Modifier and Type | Method and Description |
---|---|
void |
jsFunction_addToGroup(java.lang.String theUserName,
java.lang.String theGroupName)
Adds a user to a group.
|
User |
jsFunction_createUser(java.lang.String theUserName,
java.lang.String thePassword)
Creates and returns a new user.
|
void |
jsFunction_deleteUser(java.lang.String theUserName) |
User |
jsFunction_duplicateUser(User theUserToDuplicate,
java.lang.String theUserName)
Duplicates the given user to create a new user.
|
User |
jsFunction_findByUserId(int theUserId)
Finds user by numeric ID.
|
User |
jsFunction_findUserByUsername(java.lang.String theUsername)
Finds user with the given user name.
|
User[] |
jsFunction_findUsersByPartialName(java.lang.String thePartialName,
int theGroupId)
Finds users that belong to group specified by id and contain given partial name.
|
java.lang.String |
jsFunction_generateRandomPassword()
Generates a random password that meets the system's current password requirements.
|
ACL[] |
jsFunction_getACLs(int theId)
Deprecated.
use
Group.jsFunction_getACLs() instead. |
int |
jsFunction_getEditLevel(java.lang.String theGroupName)
Returns the edit level for the specified user/group.
|
Group[] |
jsFunction_getUserGroups(java.lang.String theUserName)
Deprecated.
use
User.jsFunction_getGroups() instead. |
int[] |
jsFunction_getUserIdsWithEmail(java.lang.String theEmail)
Returns a list of user id's for users who have the specified email address.
|
int |
jsFunction_getViewLevel(java.lang.String theGroupName)
Returns the view level for the specified user/group.
|
void |
jsFunction_insertGroupMembership(java.lang.String theGroup,
java.lang.String theUser,
boolean thePrimary)
Creates group membership entry for a user.
|
boolean |
jsFunction_isLDAPUser(int theUserId)
Is the user an LDAP user?
|
boolean |
jsFunction_isLDAPUserExists(java.lang.String theUserName)
Checks to see if a user with the given name exists on ldap server.
|
void |
jsFunction_removeFromGroup(java.lang.String theUserName,
java.lang.String theGroupName)
Removes a user from a group.
|
void |
jsFunction_renameUser(User theUserToRename,
java.lang.String theNewUserName) |
void |
jsFunction_setContentPools(java.lang.String theUsername,
org.mozilla.javascript.NativeObject theContentPools)
Sets the content pools for a user.
|
void |
jsFunction_setPrimaryGroup(java.lang.String theUserName,
java.lang.String theGroupName)
Sets the primary group for the user.
|
void |
jsFunction_updateContactInfo(java.lang.String theUserName,
java.lang.String theFirstName,
java.lang.String theLastName,
java.lang.String theEmail)
Updates basic contact info for the user specified by theUserName.
|
void |
jsFunction_updatePasswordChangeRequired(java.lang.String theUserName,
boolean theRequired)
Update the password change required value for the specified user.
|
boolean |
jsFunction_userExists(java.lang.String theUserName)
Checks to see if a user with the given user name exists.
|
JSMap |
jsGet_userStatus() |
JSMap |
jsGet_userTypes() |
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public static JSMap myUserStatusMap
public static JSMap myUserTypesMap
public JSMap jsGet_userStatus()
public JSMap jsGet_userTypes()
public java.lang.String jsFunction_generateRandomPassword()
public User jsFunction_findUserByUsername(java.lang.String theUsername)
theUsername
- user namenull
if the user is not foundpublic User[] jsFunction_findUsersByPartialName(java.lang.String thePartialName, int theGroupId)
thePartialName
- the partial user nametheGroupId
- the group id, if group id equals -1, all users will be found that contain given partial namepublic User jsFunction_findByUserId(int theUserId)
theUserId
- user IDnull
public int[] jsFunction_getUserIdsWithEmail(java.lang.String theEmail)
theEmail
- the emailpublic boolean jsFunction_userExists(java.lang.String theUserName)
theUserName
- user namepublic boolean jsFunction_isLDAPUserExists(java.lang.String theUserName)
theUserName
- the user namepublic boolean jsFunction_isLDAPUser(int theUserId)
theUserId
- user id to check forpublic void jsFunction_insertGroupMembership(java.lang.String theGroup, java.lang.String theUser, boolean thePrimary) throws java.lang.Exception
theGroup
- grouptheUser
- user namethePrimary
- primary group or notjava.lang.Exception
public User jsFunction_createUser(java.lang.String theUserName, java.lang.String thePassword)
theUserName
- usernamethePassword
- passwordpublic void jsFunction_deleteUser(java.lang.String theUserName)
public void jsFunction_renameUser(User theUserToRename, java.lang.String theNewUserName)
public User jsFunction_duplicateUser(User theUserToDuplicate, java.lang.String theUserName)
theUserToDuplicate
- The user to duplicate.theUserName
- The new user's name.public void jsFunction_updateContactInfo(java.lang.String theUserName, java.lang.String theFirstName, java.lang.String theLastName, java.lang.String theEmail)
theUserName
- the username to update.theFirstName
- the first name to update.theLastName
- the last name to update.theEmail
- the email to update.public void jsFunction_updatePasswordChangeRequired(java.lang.String theUserName, boolean theRequired)
theUserName
- the user nametheRequired
- the new statuspublic void jsFunction_addToGroup(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the user nametheGroupName
- the name for the grouppublic void jsFunction_setPrimaryGroup(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the user nametheGroupName
- the group namepublic void jsFunction_removeFromGroup(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the user nametheGroupName
- the name for the group@Deprecated public Group[] jsFunction_getUserGroups(java.lang.String theUserName)
User.jsFunction_getGroups()
instead.theUserName
- @Deprecated public ACL[] jsFunction_getACLs(int theId)
Group.jsFunction_getACLs()
instead.theId
- the user id or group id for which to get either user or group ACLspublic int jsFunction_getViewLevel(java.lang.String theGroupName)
theGroupName
- the group name.public int jsFunction_getEditLevel(java.lang.String theGroupName)
theGroupName
- the group name.public void jsFunction_setContentPools(java.lang.String theUsername, org.mozilla.javascript.NativeObject theContentPools)
theUsername
- the name of the user we are setting.theContentPools
- the content pools we want to set. Native object in the format of {str: [str]}.Copyright © 2023 MediaBeacon, Inc. All Rights Reserved.