ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Gets the rights granted to a user or group on an item.
Example
sDroit is string
// Récupère le droit de désanonymisation de l'utilisateur Dupont
// sur la rubrique MaRubrique du fichier MonFichier.fic de la base de données MaBase
sDroit = HInfoItemRights("CNX", "Dupont", hRightsUnmask, "MaBase", "MonFichier.fic", "MaRubrique")
SWITCH sDroit
	CASE hAllowed
	...
	CASE hForbidden
	...
	CASE hInherit
	... 
END
Syntax
<Result> = HInfoItemRights(<Connection> , <User/Group> , <Rights> , <Database> , <Data file> , <Item> [, <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.
The requested information depend according to the parameter <Display mode of result>:
  • In hDefault mode, <Result> is a list of values separated by tabs.
    <Value of rights 1> + TAB + ... + TAB + <Value of rights N>

    where <Value of rights> corresponds to the value of the rights requested by the <Rights> parameter. The values in the list can correspond to one of the following constants:
    hAllowedThe relevant rights are granted to the user or group.
    hForbiddenThe relevant rights are not granted to the user or group.
    hInheritThe right is undefined at this level for the user (or the group to which they belong). The HFSQL server uses the right defined at the top level for the user (or the group to which the user belongs). For a field, the HFSQL server uses the right defined for the user (or the group to which the user belongs) at data file level.
    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 considered correspond to the constants used in the <Droit> parameter, and the values of the rights correspond to the constants hAutorisé, hInterdit, or hHérité (see table above).
<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 you want to get.
<Rights>: Integer constant
List of rights to find:
hRightsUnmaskRights to unmask an item.
<Database>: Character string
Name of the database containing the data file item for which to get the rights.
  • 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.
<Data file>: Character string
Name of the HFSQL data file containing the item for which to get the rights. The extension of the data file must be specified.
<Item>: Character string
Name of the item for which to get the rights.
<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).
hDetailsSame as hDefault.
<Result> contains the rights and there value.
hEffectiveThe rights returned correspond to the rights actually granted to the user or to the group on the data file. Inherited rights are taken into account (for example, rights granted to the groups to which the user belongs).
hEffective + hDetailsSame as hEffective.
<Result> contains the rights and there value.
Remarks
To change the rights granted to a user or group on an item, use HModifyItemRights.
Business / UI classification: Business Logic
Component: wd300hf.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help