AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL Client/Server
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Gets the rights granted to a user or group on an HFSQL Client/Server data file.
Ejemplo
// Describe the connection
MyConnection is Connection

sRights is string
sARight is string
// Retrieves the read/add rights granted to the user named Moore 
// on the MyFile.fic file found in MyDatabase
sRights = MyConnection.InfoFileRights("Moore", hRightsRead + hRightsInsert, ...
									 "MyBase", "MyFile.fic")
sARight = ExtractString(sRights, firstRank, TAB)
WHILE sARight <> EOT
	SWITCH sARight
		CASE hAllowed
		...
		CASE hForbidden
		...
		CASE hInherit
		... 
	END
	sARight = ExtractString(sRights, nextRank, TAB)
END
Sintaxis
<Result> = <Connection>.InfoFileRights(<User/Group> , <Rights> , <Database> , <Data file> [, <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 data file, the HFSQL server uses the right defined for the user (or the group to which the user belongs) at database 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>: Variable de tipo Connection
Name of the Connection variable that describes the connection for which the rights of a user or group of users must be known.
<User/Group>: Cadena de caracteres
Name of the user or group whose rights you want to get.
<Rights>: Constante o combinación de constantes de tipo Integer
List of rights to find:
hRightsAllList of all the rights.
It is advisable to use this constant in display mode hDetail or hEffective + hDetail.
hRightsAutoModifRights to perform an automatic modification on a data file.
hRightsChangeLinkRights to change the integrity rules of a data file.
hRightsChangeOwnerRights to change the owner of an element.
hRightsChangeRightsRights to change rights.
hRightsDeleteRights to delete the records from a data file.
hRightsDeleteFileRights to delete a data file (<Connection variable>.DeleteFile)
hRightsInsertRights to add records to a data file.
hRightsLockRights to lock the files or the records of a data file.
hRightsMaintenanceRights to start a reindex operation or to perform statistical calculations on a data file.
hRightsManageDuplicateRights to enable and disable the management of duplicates.
hRightsReadRights to read the records of a data file.
hRightsUnmaskRights to unmask items in a data file.
hRightsUpdateRights to modify the records of a data file.
<Database>: Cadena de caracteres
Name of the database containing the data file 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>: Cadena de caracteres
Name of the HFSQL data file on the server for which to get the rights. The extension of the data file must be specified.
<Display mode>: Constante opcional de tipo Integer
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.
Observaciones
To change the rights granted to a user or group on a data file, use <Connection variable>.ModifyFileRights.
Componente: wd300hf.dll
Versión mínima requerida
  • Versión 25
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/09/2024

Señalar un error o enviar una sugerencia | Ayuda local