PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • When is the modification of rights performed?
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
Modifies the rights granted to a user or to a group on a HFSQL Client/Server data file.
Remark: To find out the rights granted to a group or to a user on a HFSQL Client/Server data file, use HInfoFileRights.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// Copy the rights from a user to another one
sRights is string
sRights = HInfoFileRights("MyConnection", "Smith", ...
hRightsRead + hRightsInsert, "MyDatabase", "MyFile.fic")
HModifyFileRights("MyConnection", "Doe", hRightsRead + hRightsInsert, ...
sRights, "MyDatabase", "MyFile.FIC")
Syntax
<Result> = HModifyFileRights(<Connection> , <User/Group> , <Rights to modify> , <New values> , <Database> , <Data file>)
<Result>: Boolean
  • True if the rights have been modified,
  • False otherwise. HErrorInfo is used to identify the error.
No modification is performed if the new value is already assigned to the specified rights.
Remark: HErrorInfo will return an "Unknown user" or "Unknown group" error 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.
<Connection>: Character string (with or without quotes) or Connection variable
Connection for which the rights granted to a user or to a group of users must be modified. This connection corresponds to:
<User/Group>: Character string (with or without quotes)
Name of the user or group whose rights must be modified.
<Rights to modify>: Integer constant (or combination of constants)
List of rights to modify:
hRightsInsertRights to add new records into a data file.
hRightsLockRights to lock the data files or the records of a data file.
hRightsChangeRightsRights to change the rights.
hRightsChangeLinkRights to modify the integrity rules on a data file.
hRightsChangeOwnerRights to modify the owner of an element.
hRightsManageDuplicateRights to enable and disable the management of duplicates.
hRightsReadRights to read the records of a data file.
hRightsMaintenanceRights to start a re-index operation or to perform statistical calculations on a data file.
hRightsAutoModifRights to perform the automatic modification of data files on a data file.
hRightsUpdateRights to modify the records of a data file.
hRightsDeleteRights to delete the records from a data file.
hRightsDeleteFileRights to delete a data file (HDeleteFile).
<New values>: Integer constants
List of new values for the modified rights. New values must be assigned to all the rights specified in <Rights to modify> (in the same order).
If a single value is indicated in this parameter, it will be assigned to all the rights specified in <Rights to modify>.
The possible values are as follows:
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 will inherit from the value of the rights granted to the group to which he belongs.
<Database>: Character string (with or without quotes)
Name of the database containing the data file for which the rights must be modified.
  • 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.
<Data file>: Character string (with or without quotes)
Name of the data file for which the rights must be modified.
Remarks

When is the modification of rights performed?

The modification of rights is effective as soon as HModifyFileRights is run for the users who are connected and affected by the modification. There is no need to restart the server to take the new rights into account.
Component : wd250hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment