HInfoViewRights (Function) In french: HInfoDroitVue
Available only with this kind of connection
Allows you to find out the rights granted to a user or to a group on an SQL view or on a materialized view.
sRights is string sARight is string // Retrieves the read/add rights granted to the usernamed Moore // on MyCustomerView found in MyDatabase sRights = HInfoViewRights("CNT", "Moore", hRightsRead + hRightsInsert, ... "MyDatabase", "MyCustomerView") sARight = ExtractString(sRights, firstRank, TAB) WHILE sARight <> EOT SWITCH sARight CASE hAllowed ... CASE hForbidden ... CASE hInherit ... END sARight = ExtractString(sRights, nextRank, TAB) END
Syntax
<Result> = HInfoViewRights(<Connection> , <User/Group> , <Rights> , <Database> , <View> [, <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> parameter and the values of the rights correspond to the hAllowed, hForbidden or hInherited constant (see the above table).
<Connection>: Character string or Connection variable Connection for which the rights of a user or group of users must be known. This connection corresponds to: <User/Group>: Character string Name of the user or group whose rights must be known. <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. | hRightsChangeRights | Rights to change rights. | hRightsDelete | Rights to delete records from a view. | hRightsDeleteView | Rights to delete a view. | hRightsInsert | Rights to add records to a view. | hRightsMaintenance | Rights to start a re-index operation or a statistical calculation on a materialized view. | hRightsRead | Rights to read the records of a view. | hRightsUpdate | Rights to modify the records of a view. |
<Database>: Character string Name of the database containing the SQL or materialized view with the rights that must be known. If the database corresponds to the one defined in the connection, this parameter can correspond to an empty string (""). A WLanguage error occurs if no database is defined in the connection and if this parameter corresponds to an empty string. <View>: Character string Name of the SQL view or materialized view on the server for which the rights must be known. <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 that will be actually granted to the user or to the group on the view. The inherited rights are taken into account (rights granted to the groups to which the user belongs for example). | hEffective + hDetails | Same as hEffective. <Result> contains the rights and there value. |
This page is also available for…
|
|
|
|