Interface ISecurityService
Provides operations for:
- User management
- Group management
- Permission management.
Syntax
public interface ISecurityService
Methods
AddSubvendorManagerToGroup(Guid, Guid)
Add the user to the subvendor group as subvendor manager. Throws a fault if the specified user is member in any other groups, or if the user is already in the specified group, or if the specified group is not subvendor group.
Declaration
void AddSubvendorManagerToGroup(Guid userGuid, Guid groupGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | userGuid | The GUID of the user. |
| System.Guid | groupGuid | The GUID of the subvendor group. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
CreateGroup(GroupInfo)
Creates a new group.
Declaration
Guid CreateGroup(GroupInfo groupInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupInfo | groupInfo | The parameters of the group to be created. The Guid member of the info parameter is ignored. |
Returns
| Type | Description |
|---|---|
| System.Guid | The Guid of the newly created group. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
CreateUser(UserInfo)
Creates a new user.
Declaration
Guid CreateUser(UserInfo userInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| UserInfo | userInfo | The parameters of the user to be created. The Guid member of the info parameter is ignored. |
Returns
| Type | Description |
|---|---|
| System.Guid | The Guid of the newly created user. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
DeleteGroup(Guid)
Deletes a specific group. The group is not deleted internally but is set to inactive so that it is no longer listed.
Declaration
void DeleteGroup(Guid groupGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | groupGuid | The GUID of the group to be deleted. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
DeleteUser(Guid)
Deletes a specific user. The user is not deleted internally but is set to inactive so that it is no longer listed.
Declaration
void DeleteUser(Guid userGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | userGuid | The GUID of the user to be deleted. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
GetGroup(Guid)
Returns information about a group.
Declaration
GroupInfo GetGroup(Guid groupGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | groupGuid | The GUID od the group. |
Returns
| Type | Description |
|---|---|
| GroupInfo | Information about the specific group. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
GetUser(Guid)
Returns information about the user.
Declaration
UserInfo GetUser(Guid userGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | userGuid | The guid of the user. |
Returns
| Type | Description |
|---|---|
| UserInfo | Information about the specific user. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListGroups()
Returns the list of memoQ Server groups.
Declaration
GroupInfo[] ListGroups()
Returns
| Type | Description |
|---|---|
| GroupInfo[] | The list of groups. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListGroupsOfUser(Guid)
Returns the groups the user of member of.
Declaration
GroupInfo[] ListGroupsOfUser(Guid userGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | userGuid | The GUID of the user. |
Returns
| Type | Description |
|---|---|
| GroupInfo[] | A list of GroupInfo objects, each representing a group the user is member of. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListObjectPermissions(Guid)
Returns the currently assigned (global) permissions on an object(TM/TB/Corpus/light resource).
Declaration
ObjectPermission[] ListObjectPermissions(Guid objectGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | objectGuid | The object (TM/TB/Corpus/light resource) for which the permissions are to be returned. |
Returns
| Type | Description |
|---|---|
| ObjectPermission[] | The list of permissions for the object. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListSubvendorGroups()
Returns the list of memoQ Server subvendor groups.
Declaration
GroupInfo[] ListSubvendorGroups()
Returns
| Type | Description |
|---|---|
| GroupInfo[] | The list of groups. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListSubvendorManagers()
Returns the list of memoQ Server subvendor managers.
Declaration
UserInfo[] ListSubvendorManagers()
Returns
| Type | Description |
|---|---|
| UserInfo[] | The list of users. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListUsers()
Returns the list of memoQ Server users.
Declaration
UserInfo[] ListUsers()
Returns
| Type | Description |
|---|---|
| UserInfo[] | The list of users. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
ListUsersOfGroup(Guid)
Returns the users of the group.
Declaration
UserInfo[] ListUsersOfGroup(Guid groupGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | groupGuid |
Returns
| Type | Description |
|---|---|
| UserInfo[] | A list of UserInfo objects, each representing a user that is member of the group. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
Login(String, String)
!!! DEPRECATED !!! Logs in a memoQ user and creates a session in the memoQ server. The session is identified by the string returned by this function. The session is used to authorize the user and check permissions for certain functions. The session identifier is expected as a parameter in the functions requiring a valid session, hence the return value should be stored by the caller. The session has a 2 hour expiry window. A user can have multiple parallel sessions.
Declaration
string Login(string userName, string passwordHash)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | userName | The name of the user. |
| System.String | passwordHash | The hash of the users password. |
Returns
| Type | Description |
|---|---|
| System.String | A session identifier which will be required by functions using the user session. Null is returned if login fails. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
Logout(String)
!!! DEPRECATED !!! Terminates a user session. After this function is called the session identifier will no longer be valid.
Declaration
void Logout(string sessionId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | sessionId | The identifier of the session to terminate. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
RemoveSubvendorManagerFromGroup(Guid, Guid)
Removes the subvendor manager from the subvendor group. Throws a fault if the user is not subvendor manager, or the specified group is not subvendor group, or the specified user is not part of the specified group.
Declaration
void RemoveSubvendorManagerFromGroup(Guid userGuid, Guid groupGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | userGuid | The GUID of the user. |
| System.Guid | groupGuid | The GUID of the subvendor group. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
SetGroupsOfUser(Guid, Guid[])
Sets the groups the user is to be member of.
Declaration
void SetGroupsOfUser(Guid userGuid, Guid[] groupGuids)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | userGuid | The GUID of the user. |
| System.Guid[] | groupGuids | A list of GUIDs each representing a group the user is to be added to. Existing group assignments are deleted. Can not be null. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
SetObjectPermissions(Guid, ObjectPermission[])
Sets the new (global) permissions on an object. Existing (global) permissions are deleted.
Declaration
void SetObjectPermissions(Guid objectGuid, ObjectPermission[] permissions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | objectGuid | The object (TM/TB/Corpus/light resource) for which the permissions are to be set. |
| ObjectPermission[] | permissions | The new permissions to be assigned. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
SetUsersOfGroup(Guid, Guid[])
Sets the user members of a group.
Declaration
void SetUsersOfGroup(Guid groupGuid, Guid[] userGuids)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | groupGuid | The GUID of the group. |
| System.Guid[] | userGuids |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
UpdateGroup(GroupInfo)
Updates an existing group.
Declaration
void UpdateGroup(GroupInfo groupInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupInfo | groupInfo | A GroupInfo object holding information about the group to be updated. Can not be null. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |
UpdateUser(UserInfo)
Updates an existing user.
Declaration
void UpdateUser(UserInfo userInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| UserInfo | userInfo | A UserInfo object holding information about the user to be updated. Can not be null. |
Exceptions
| Type | Condition |
|---|---|
| UnexpectedFault | An unexpected error occurred; equivalent of an 501 'Internal server error' http result. |
| GenericFault | The details within the fault identify the specific error. Thrown for expected business errors that have no specific faults. |