|
|
|
|
|
<Connection variable>.InfoServerRights (Function) In french: <Variable Connexion>.InfoDroitServeur
Available only with this kind of connection
Gets the rights granted to a user or group of users on a server. The server used was defined in the connection.
MyConnection is Connection
ARight is string
ARight = MyConnection.InfoServerRights("Smith", hRightsCreateDB)
SWITCH ARight
CASE hAllowed
...
CASE hForbidden
...
CASE hInherit
...
END
Syntax
<Result> = <Connection>.InfoServerRights(<User/Group> , <Rights> [, <Display mode>])
<Result>: Character string - Requested information,
- Empty string ("") if an error occurred,
- "Unknown user" or "Unknown group" if the current user has no permissions to see other users (hRightsSeeUser constant) and wants to get information about another user or group.
In hDefault mode, <Result> is a list of values separated by tabs. Each value in the list corresponds to the rights requested by <Rights>. The values in the list can correspond to one of the following constants: | | hAllowed | The relevant rights are granted to the user or group. | hForbidden | The relevant rights are not granted to the user or group. | hInherit | The user belongs to at least one group to which the relevant rights were granted. This constant is returned only if the display mode is not set to hEffective. |
In hDetails mode, <Result> is a list of values with the following format:
<Relevant rights 1> + TAB + <Value of rights 1> + CR + ... <Relevant rights N> + TAB + <Value of rights N> + CR The rights correspond to the constants used in the <Rights> parameters and the values of the rights correspond to the hAllowed, hForbidden or hInherit constants (see the above table).
<Connection>: Connection variable Name of the Connection variable that describes the connection for which the rights of a user or group of users must be known. <User/Group>: Character string Name of the user or name of the group for which to get the rights. <Rights>: Integer constant (or combination of constants) List of rights to find: | | hRightsAll | List of all the rights. We recommend that you use this constant in hDetails or hEffective + hDetails display mode. | hRightsBackup | Rights to perform a backup. You cannot use the hRightsAll constant with <Connection variable>.InfoServerRights to get this information. Use hRightsAll with <Connection variable>.InfoDatabaseRights. | hRightsChangePassword | Rights to change the password of a user on the server (the user can change his own password and the administrator can change the password of each user). | hRightsChangeRights | Rights to change the rights. | hRightsCreateDB | Rights to create a database. | hRightsDisconnectClient | Rights to disconnect client computers. | hRightsManageServer | Rights to use <Connection variable>.SetServer. | hRightsManageTask | Rights to manage the scheduled tasks. | hRightsManageUser | Rights to delete and add users or groups. | hRightsPriority | Rights to modify the priority of the current application (<Connection variable>.Priority) or the priority of another client application (<Connection variable>.PriorityClient). | hRightsReadLogStat | Rights to see the activity statistics and the server logs. | hRightsSeeUser | Rights to see the different users and groups. | hRightsSendMessageToClient | Rights to send messages to the client computers. | hRightsServerReplication | Rights to set up and run a replication between two HFSQL servers. | hRightsStopServer | Rights to stop a server (<Connection variable>.StopServer). |
<Display mode>: Optional Integer constant Result display mode: | | hDefault (Default value) | The rights returned do not take the inherited rights into account (rights granted to the groups to which the user belongs). If no rights were defined, the value will be set to hInherit. <Result> contains the values of the requested rights (in the same order). | hDetails | Same as hDefault. <Result> contains the rights and there value. | hEffective | The rights returned correspond to the rights actually granted to the user or to the group on the server. Inherited rights are taken into account (for example, rights granted to the groups to which the user belongs). | hEffective + hDetails | Same as hEffective. <Result> contains the rights and there value. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|