PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HInfoViewRights (Function)
In french: HInfoDroitVue
HFSQL Client/ServerAvailable only with this kind of connection
Allows you to find out the rights granted to a user or to a group on a SQL view or on a materialized view.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Example
sRights is string
sARight is string
// Retrieves the read/add rights granted to the user named 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 does not have the rights to see the users (hRightsSeeUser constant) and if he wants to get information about another user or another group.
In hDefault mode, <Result> is a list of values separated by tabulations (TAB). Each value found in this list corresponds to the rights requested by <Rights>. Each value found in this list can correspond to one of the following constants:
hAllowedThe relevant rights are granted to the user or to the group.
hForbiddenThe relevant rights are not granted to the user or to the group.
hInheritThe user belongs to at least one group to which the relevant rights was 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 rights1> + 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 (with or without quotes) 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 (with quotes)
Name of the user or name of the group whose rights are requested.
<Rights>: Integer constant (or combination of constants)
List of rights to find:
hRightsInsertRights to add new records into a view.
hRightsChangeRightsRights to change the rights.
hRightsReadRights to read the records of a view.
hRightsMaintenanceRights to start a re-index operation or a statistical calculation on a materialized view.
hRightsUpdateRights to modify the records of a view.
hRightsDeleteRights to delete the records from a view.
hRightsDeleteViewRights to delete a view.
hRightsAllList of all the rights.
We recommend that you use this constant in hDetails or hEffective + hDetails display mode.
<Database>: Character string (with quotes)
Name of the database containing the SQL or materialized view for which the rights are requested. If the database corresponds to the database 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 (with quotes)
Name of the SQL view or materialized view found on the server for which the rights are requested.
<Display mode>: Optional Integer constant
Mode for displaying the result:
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).
hDetailsSame as hDefault.
<Result> contains the rights and its value.
hEffectiveThe 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 + hDetailsSame as hEffective.
<Result> contains the rights and its value.
Component : wd250hf.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment