PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • When is the modification of rights performed?
Products
WinDevWebDev - Server codeWebDev - Browser codeWinDev MobileReports and Queries
Platforms
WindowsLinuxWindows MobileUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple Watch
Languages
JavaPHPAjaxUser code (UMC)External language
Databases
HFSQLHFSQL Client/ServerStored proceduresOLE DBODBCNative Accesses

HModifyViewRights (Function)
In French: HModifieDroitVue

Modifies the rights granted to a user or to a group on a SQL view or on a materialized view.

Note: To find out the rights granted to a group or to a user on a SQL view or on a materialized view, use HInfoViewRights.

Example
// Copy the rights from a user to another one
sRights is string
sRights = HInfoViewRights("MyConnection", "Moore", ...
hRightsRead + hRightsInsert, "MyDatabase", "MyCustomerView")
HModifyVierwRights("MyConnection", "Smith", ...
hRightsRead + hRightsInsert, sRights, "MyDatabase", "MyCustomerView")

Syntax
<Result> = HModifyViewRights(<Connection Name> , <Name of User/Group> , <Rights to Modify> , <New Values> , <Database> , <View Name>)
<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.

Note: An error ("Unknown user" or "Unknown group") will be returned by HErrorInfo 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 Name>: Character string (with or without quotes)
Name of the connection for which the rights granted to a user or to a group of users must be modified. This connection was defined in the data model editor, or by HDescribeConnection or HOpenConnection.
<Name of 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 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.
<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 user group to which he belongs.
<Database>: Character string (with or without quotes)
Name of the database containing the SQL view or the materialized view 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.
<View Name>: Character string (with or without quotes)
Name of the SQL view or materialized view for which the rights must be modified.

Remarks

When is the modification of rights performed?

The modification of rights is effective as soon as HModifyViewRights 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.

Components
Reports and Queries wd210hf.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment