Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSUserAcctSvcs Interface Reference

Inherited by IDSSUserAcctSvcs2.

List of all members.


Detailed Description

This interface provides a set of higher level services for User and Group account management.

The impetus for this is to reduce the overhead and ensure consistency of the user repository.


Public Member Functions

HRESULT AddMember ([in] IDSSUser *pUser,[in] IDSSUser *pMember)
 Add a member into the membership of a user or a user group.
HRESULT Administrator ([out, retval] IDSSUser ppAdministrator)
 The administrator user account Returns the Administrator user account.
HRESULT ClearMembership ([in] IDSSUser *pUser)
 Clear the membership of a user or a user group This method clears the membership list of a user or a user group and saves the changes of all related users and user groups.
HRESULT CreateGroup ([in] BSTR Name,[in, defaultvalue(0)] Int32 Flags,[in, defaultvalue(0)] Int32 WindowsNTSIDLength,[in, optional] VARIANT *pWindowsNTSID,[out, retval] IDSSUserAccount ppUserGroup)
 Creates a new user group.
HRESULT CreateUser ([in] BSTR FullName,[in] BSTR LoginName,[in, defaultvalue(0)] Int32 Flags,[in, defaultvalue(0)] Int32 WindowsNTSIDLength,[in, defaultvalue(0)] VARIANT *pWindowsNTSID,[in, defaultvalue("")] BSTR RDBMSLogin,[out, defaultvalue(0)] BSTR *pNewLoginName,[out, retval] IDSSUserAccount ppUserAccount)
 Creates a new user account.
HRESULT CreateUserProfile ([in] IDSSProject *pProject,[in] IDSSUser *pUser,[in, defaultvalue(0)] Int32 Flag)
 Creates a user profile for a user under a project This method creates the user profile folders for a user under a project.
HRESULT DeleteGroup ([in] IDSSUser *pUserGroup,[in, defaultvalue(0)] Int32 Flags)
 Deletes an existing user group.
HRESULT DeleteUser ([in] IDSSUser *pUser,[in, defaultvalue(0)] Int32 Flags)
 Delete a user account.
HRESULT DeleteUserProfile ([in] IDSSProject *pProject,[in] IDSSUser *pUser,[in, defaultvalue(0)] Int32 Flag)
 Deletes a user profile of a user from a project This method deletes the user profile folders for a user under a project.
HRESULT DuplicateGroup ([in] IDSSUserAccount *pOriginal,[in] BSTR Name,[in, defaultvalue(0)] Int32 Flags,[in, defaultvalue(0)] Int32 WindowsNTSIDLength,[in, optional] VARIANT *pWindowsNTSID,[out, retval] IDSSUserAccount ppUserGroup)
 Duplicates an existed user group This method duplicates a user group.
HRESULT DuplicateUser ([in] IDSSUserAccount *pOriginal,[in] BSTR LoginName,[in, defaultvalue(0)] Int32 Flags,[in, defaultvalue("")] BSTR FullName,[in, defaultvalue(0)] Int32 WindowsNTSIDLength,[in, optional] VARIANT *pWindowsNTSID,[in, defaultvalue("")] BSTR RDBMSLogin,[out, defaultvalue(0)] BSTR *pNewLoginName,[out, retval] IDSSUserAccount ppUserAccount)
 This method duplicates a user account (user object).
HRESULT Everyone ([out, retval] IDSSUser ppEveryone)
 Returns the Everyone user group.
HRESULT Groups ([in, defaultvalue(0)] Int32 Flags,[out, retval] IDSSCollection ppGroupFolder)
 Generate a collection of user group objects.
HRESULT LoadUsers ([in] IDSSUsers *pUserCollection,[in] EnumDSSSourceFlags LoadFlags)
 This method loads all users in a IDSSUsers collection into Object Server cache with requested parts of their definition.
HRESULT Public ([out, retval] IDSSUser ppPublic)
 The Public user group Returns the Public user group that represents the anonymous users.
HRESULT RemoveMember ([in] IDSSUser *pUser,[in] IDSSUser *pMember)
 Remove a member from the membership of a user or a user group.
HRESULT SystemAdmins ([out, retval] IDSSUser ppSystemAdmins)
 Returns the SystemAdmins user group that represents the system administrator users.
HRESULT SystemMonitors ([out, retval] IDSSUser ppSystemMonitors)
 The system monitors user group Returns the SystemMonitors user group that represents the system monitor users.
HRESULT Users ([in, defaultvalue(0)] Int32 Flags,[out, retval] IDSSCollection ppUserFolder)
 Generate a collection that contains user accounts.


Member Function Documentation

HRESULT IDSSUserAcctSvcs::AddMember [in] IDSSUser pUser,
[in] IDSSUser pMember
 

Add a member into the membership of a user or a user group.

This method is similar to the Add method in IDSSUsers. It adds a user or a user group to the membership of a user group. The method saves any change made to either object.

Parameters:
pUser The pointer to a user.
pMember The pointer to a member to be added.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG Either pUser is null or pMember is null.

HRESULT IDSSUserAcctSvcs::Administrator [out, retval] IDSSUser   ppAdministrator  ) 
 

The administrator user account Returns the Administrator user account.

Parameters:
ppAdministrator The pointer to IDSSUser interface of the Administrator user account
Returns:
Usual COM result code:
  • S_OK
  • E_POINTER The memory of ppAdministrator is not allocated before calling this method

HRESULT IDSSUserAcctSvcs::ClearMembership [in] IDSSUser pUser  ) 
 

Clear the membership of a user or a user group This method clears the membership list of a user or a user group and saves the changes of all related users and user groups.

Parameters:
pUser The pointer to a user or a user group.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG pUser is null.

HRESULT IDSSUserAcctSvcs::CreateGroup [in] BSTR  Name,
[in, defaultvalue(0)] Int32  Flags,
[in, defaultvalue(0)] Int32  WindowsNTSIDLength,
[in, optional] VARIANT *  pWindowsNTSID,
[out, retval] IDSSUserAccount   ppUserGroup
 

Creates a new user group.

If the name is in use by another user group, an error will be returned.

Parameters:
Name The name of the new user group. User groups must have unique names within a repository.
Flags Reserved. Should be set to 0.
WindowsNTSIDLength If pWindowsNTSID is passed in, this parameter must be set to the size (in bytes) of the user group's NTSID.
pWindowsNTSID (optional) NT SID associated with the new user group.
ppUserGroup The pointer to IDSSUser interface of the created user group.
Returns:
Usual COM result code:
  • S_OK
  • E_POINTER ppUserGroup is NULL.
  • DSSCOM_E_DUP_NAME_TYPE Another user group already uses the supplied group name.

HRESULT IDSSUserAcctSvcs::CreateUser [in] BSTR  FullName,
[in] BSTR  LoginName,
[in, defaultvalue(0)] Int32  Flags,
[in, defaultvalue(0)] Int32  WindowsNTSIDLength,
[in, defaultvalue(0)] VARIANT *  pWindowsNTSID,
[in, defaultvalue("")] BSTR  RDBMSLogin,
[out, defaultvalue(0)] BSTR *  pNewLoginName,
[out, retval] IDSSUserAccount   ppUserAccount
 

Creates a new user account.

This method creates a new user account (user object) and adds this new user account under Everyone user group. The Everyone user group is added into this user's membership.

If the FullName is used by another user account, an error is returned.
If the LoginName is used by another user account, an error is returned. And a suggested login name is provided through out-parameter pNewLoginName.
If Windows NT SID is provided, it checks whether this SID is already used by another user account before creating the new user account. A Windows NT SID is an array of long values. An error is returned if another user account uses this SID or it is not an array of long values.
If optional parameter RDBMSLogin is provided, it checks whether this RDBMSLogin is already used by another user account before creating the new user account. An error is returned if another user account uses this RDBMSLogin.
The reason that we use VARIANT instead of SAFEARRAY as the type of WindowNTSID is that both VB6 and VB5 fail in compilation if the optional parameter is SAFEARRAY.
Parameters:
FullName The full name of the User.
LoginName The Login of the user account.
Flags The flag to indicate the options used in creating a new user account. It is a bit-wise enumeration value. The current available enumeration values are:
WindowsNTSIDLength The length of the Windows NT SID of the user account.
pWindowsNTSID The Windows NT SID of the user account.
RDBMSLogin The warehouse login of the user account.
pNewLoginName Return the login name of the new account. It cannot have the same login name as the old account, since login names must be unique within a repository.
ppUserAccount The pointer to IDSSUserAccount interface of the created user account.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG If pWindowNTSID is not an array of long values.
  • E_POINTER The memory of ppUserAccount is not allocated before calling this method.
  • CLISVC_E_DUP_USERLOGIN Another user already uses the supplied login.
  • CLISVC_E_DUP_NTSID The supplied NTSID is already used by another user or user group.
  • CLISVC_E_DUP_DBMSLOGIN Another user already uses the supplied RDBMS login.
  • DSSCOM_E_DUP_NAME_TYPE The supplied Full Name is already used by another user account.

HRESULT IDSSUserAcctSvcs::CreateUserProfile [in] IDSSProject pProject,
[in] IDSSUser pUser,
[in, defaultvalue(0)] Int32  Flag
 

Creates a user profile for a user under a project This method creates the user profile folders for a user under a project.

This method is only supported on a project session.

Parameters:
pProject The project where the user profile is added
pUser The user whose profile is created
Flag Not used now.
Returns:
Usual COM result code:
  • S_OK
  • CLISVC_E_NO_GROUP_USER_PROFILE Only user account can have profile. The user is a user group, not a user.
  • CLISVC_E_USER_PROFILE_EXIST This user already has a profile under this project.
  • CLISVC_E_USERPROFILE_PROJECT_LEVEL This method is only supported on a project session.
  • E_INVALIDARG pProject and/or pUser are either NULL or invalid.

HRESULT IDSSUserAcctSvcs::DeleteGroup [in] IDSSUser pUserGroup,
[in, defaultvalue(0)] Int32  Flags
 

Deletes an existing user group.

An error is returned if an attempt to delete Everyone group is made.

An error is also returned if this user group is not found in the depository, or is used by other objects.
Parameters:
pUserGroup The user group to be deleted.
Flags The flag to indicate the options used in deleting the user account. It is a bit-wise enumeration value. Currently, it is not used.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG NULL value of pUserGroup is passed in.
  • DSSCOM_E_DELETE_DEPOBJ Can not delete this user group because other objects depend on it.
  • MDSVR_E_NO_ID This user group is not found in the metadata. It may have been deleted.
  • CLISVC_E_DELETE_GROUP Can not delete this user group because it is not created by this source, or it is the Everyone user group.

HRESULT IDSSUserAcctSvcs::DeleteUser [in] IDSSUser pUser,
[in, defaultvalue(0)] Int32  Flags
 

Delete a user account.

An error is returned if an attempt to delete Administrator user account is made.

An error is also returned if this user account is not found in the depository, or is used by other objects.
Parameters:
pUser The user to be deleted.
Flags The flag to indicate the options used in deleting the user account. It is a bit-wise enumeration value. Currently, it is not used.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG NULL value of pUser is passed in.
  • DSSCOM_E_DELETE_DEPOBJ Can not delete this user account because other objects depend on it
  • MDSVR_E_NO_ID This user account is not found in the metadata. It may have been deleted.
  • CLISVC_E_DELETE_GROUP Can not delete this user account because it is not created by this source or it is the Administrator

HRESULT IDSSUserAcctSvcs::DeleteUserProfile [in] IDSSProject pProject,
[in] IDSSUser pUser,
[in, defaultvalue(0)] Int32  Flag
 

Deletes a user profile of a user from a project This method deletes the user profile folders for a user under a project.

This method is only supported on a project session.

Parameters:
pProject The project where the user profile is deleted.
pUser The user whose profile is deleted.
Flag Not used now.
Returns:
Usual COM result code:
  • S_OK
  • CLISVC_E_NO_GROUP_USER_PROFILE Only user account can have profile. The user is a user group, not a user.
  • CLISVC_E_USER_PROFILE_NOT_EXIST This user does not have a profile under this project.
  • CLISVC_E_USERPROFILE_PROJECT_LEVEL This method is only supported on a project session.
  • E_INVALIDARG pProject and/or pUser are either NULL or invalid.

HRESULT IDSSUserAcctSvcs::DuplicateGroup [in] IDSSUserAccount pOriginal,
[in] BSTR  Name,
[in, defaultvalue(0)] Int32  Flags,
[in, defaultvalue(0)] Int32  WindowsNTSIDLength,
[in, optional] VARIANT *  pWindowsNTSID,
[out, retval] IDSSUserAccount   ppUserGroup
 

Duplicates an existed user group This method duplicates a user group.

If the name is used by another user group, an error is returned.

Parameters:
pOriginal The pointer to the original user group
Name The name of the new user group
Flags Reserved. Should be set to 0
WindowsNTSIDLength If pWindowsNTSID is provided, this parameter must be set to length of the Windows NT SID of the user group
pWindowsNTSID (optional) The Windows NT SID of the new user group
ppUserGroup The pointer to IDSSUser interface of the created user group
Returns:
Usual COM result code:
  • S_OK
  • E_POINTER The memory of ppUserGroup is not allocated before calling this method
  • CLISVC_E_CREATE_GROUP Failure to create the user group because the name is not provided.
  • DSSCOM_E_DUP_NAME_TYPE The name is used by another user group

HRESULT IDSSUserAcctSvcs::DuplicateUser [in] IDSSUserAccount pOriginal,
[in] BSTR  LoginName,
[in, defaultvalue(0)] Int32  Flags,
[in, defaultvalue("")] BSTR  FullName,
[in, defaultvalue(0)] Int32  WindowsNTSIDLength,
[in, optional] VARIANT *  pWindowsNTSID,
[in, defaultvalue("")] BSTR  RDBMSLogin,
[out, defaultvalue(0)] BSTR *  pNewLoginName,
[out, retval] IDSSUserAccount   ppUserAccount
 

This method duplicates a user account (user object).

The Abbreviation (LoginName), Windows NT SID, RDBMSLogin, and Inbox properties of the new user account are set to NULL. The new user account is added under Everyone user group. The Everyone user group is added into this new user's membership. All the membership of the original user account is copied into the membership of the new user.

If the FullName is used by another user account, an error is returned.
If the LoginName is used by another user account, an error will be return. And a suggested login name will be provided through out-parameter pNewLoginName.
If Windows NT SID is provided, it checks whether this SID is already used by another user account before creating the new user account. A Windows NT SID is an array of long values. An error is returned if another user account uses this SID or it is not an array of long values.
If optional parameter RDBMSLogin is provided, it checks whether this RDBMSLogin is already used by another user account before creating the new user account. An error is returned if another user account uses this RDBMSLogin.
The reason that we use VARIANT instead of SAFEARRAY as the type of WindowNTSID is both VB6 and VB5 fail in compilation if the optional parameter is SAFEARRAY.
Parameters:
pOriginal The user account to be duplicated.
LoginName The Login of the user account.
Flags The flag to indicate the options used in creating a new user account. It is a bit-wise enumeration value. The current available enumeration values are:
FullName The full name of the User.
WindowsNTSIDLength The length of the Windows NT SID of the user account.
pWindowsNTSID The Windows NT SID of the user account.
RDBMSLogin The warehouse login of the user account.
pNewLoginName Return the login name of the new account. It cannot have the same login name as the old account, since login names must be unique within a repository.
ppUserAccount The pointer to IDSSUserAccount interface of the created user account.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG If pWindowNTSID is not an array of long values.
  • E_POINTER The memory of ppUserAccount is not allocated before calling this method.
  • CLISVC_E_CREATE_USER Failure to create a new user because either the FullName is not supplied, or the LoginName is used by another user account, or the Windows NT SID is used by another user account, or the RDBMSLogin is used by another user account.
  • DSSCOM_E_DUP_NAME_TYPE The FullName is used by another user account.

HRESULT IDSSUserAcctSvcs::Everyone [out, retval] IDSSUser   ppEveryone  ) 
 

Returns the Everyone user group.

The Everyone user group is a system defined user group whose membership contains all users in the repository.

Parameters:
ppEveryone Returns pointer to the Everyone group
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSUserAcctSvcs::Groups [in, defaultvalue(0)] Int32  Flags,
[out, retval] IDSSCollection   ppGroupFolder
 

Generate a collection of user group objects.

The flag indicates which kinds of user groups is in the result collection. If no option is provided, all user groups in the MD repository are in the result collection.

Parameters:
Flags This flag indicates what kinds of user groups should be in the result user group collection. It is a bit-wise enumeration value. The available values are listed in the EnumDSSListGroup enumeration.
ppGroupFolder The pointer to IDSSCollection interface of the user group collection
Returns:
Usual COM result code:
  • S_OK
  • E_POINTER The memory of ppUserGroups is not allocated before calling this method

HRESULT IDSSUserAcctSvcs::LoadUsers [in] IDSSUsers pUserCollection,
[in] EnumDSSSourceFlags  LoadFlags
 

This method loads all users in a IDSSUsers collection into Object Server cache with requested parts of their definition.

Since all user objects in the collection are loaded in one call, it reduces the time required to access these users.

Example Usage:
Assuming pEveryone is the IDSSUser object that represent the Everyone group
myUserAcctSvcs.LoadUsers pEveryone.Membership(False),
DssSourceBrowser + DssSourceDefn
This call ensures that every user in the repository be loaded in the Object Server cache with their Browser and Definition. Subsequent access to these users objects becomes faster.
Parameters:
pUserCollection Collection of users to load.
LoadFlags Usual source flags to modify the behavior of the operation. For example, they can be used to control how much of the user objects is loaded.
Returns:
Usual COM result code:
  • S_OK Success
  • E_INVALIDARG Invalid arguments passed in

HRESULT IDSSUserAcctSvcs::Public [out, retval] IDSSUser   ppPublic  ) 
 

The Public user group Returns the Public user group that represents the anonymous users.

Parameters:
ppPublic The pointer to IDSSUser interface of the Public user group
Returns:
Usual COM result code:
  • S_OK
  • CLISVC_E_MD4 Only Castor metadata has Public user group
  • E_POINTER The memory of ppPublic is not allocated before calling this method

HRESULT IDSSUserAcctSvcs::RemoveMember [in] IDSSUser pUser,
[in] IDSSUser pMember
 

Remove a member from the membership of a user or a user group.

It removes a user or a user group from the membership of a user group, or a user group from the membership of a user. The method saves the changes of both objects.

Parameters:
pUser The pointer to a user or a user group.
pMember The pointer to a member to be removed.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG Either pUser is null or pMember is null.

HRESULT IDSSUserAcctSvcs::SystemAdmins [out, retval] IDSSUser   ppSystemAdmins  ) 
 

Returns the SystemAdmins user group that represents the system administrator users.

Parameters:
ppSystemAdmins The pointer to IDSSUser interface of the SystemAdmins user group
Returns:
Usual COM result code:
  • S_OK
  • CLISVC_E_MD4 Only Castor metadata has SystemAdmins user group
  • E_POINTER The memory of ppSystemAdmins is not allocated before calling this method

HRESULT IDSSUserAcctSvcs::SystemMonitors [out, retval] IDSSUser   ppSystemMonitors  ) 
 

The system monitors user group Returns the SystemMonitors user group that represents the system monitor users.

Parameters:
ppSystemMonitors The pointer to IDSSUser interface of the SystemMonitors user group
Returns:
Usual COM result code:
  • S_OK
  • CLISVC_E_MD4 Only Castor metadata has SystemMonitors user group
  • E_POINTER The memory of ppSystemMonitors is not allocated before calling this method

HRESULT IDSSUserAcctSvcs::Users [in, defaultvalue(0)] Int32  Flags,
[out, retval] IDSSCollection   ppUserFolder
 

Generate a collection that contains user accounts.

The flag indicates which kinds of users are in the result collection. If no option is provided, all user accounts in the user depository are in the result collection. Alternatively the collection can be restricted to enabled users and the like.

Parameters:
Flags This flag indicates what kinds of users should be in the result user collection. It is a bit-wise enumeration value. The available enumeration values are listed in the EnumDSSListUser enumeration.
ppUserFolder The pointer to IDSSCollection interface of the user collection
Returns:
Usual COM result code:
  • S_OK
  • E_POINTER The memory of ppUsers is not allocated before calling this method


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.