AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL Client/Server
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Allows you to find out the rights granted to a user or to a group on a database.
Ejemplo
// Description de la connexion
MaConnexion is Connection

LesDroits is string
UnDroit is string
// Récupère les droits de lecture et d'ajout de l'utilisateur Dupont 
// sur la base de données MaBase
LesDroits = MaConnexion.InfoDroitBaseDeDonnées("Dupont", hRightsRead + hRightsInsert, "MaBase")
UnDroit = ExtractString(LesDroits, firstRank, TAB)
WHILE UnDroit <> EOT
	SWITCH UnDroit
		CASE hAllowed
		...
		CASE hForbidden
		...
		CASE hInherit
		... 
	END    
	UnDroit = ExtractString(LesDroits, nextRank, TAB)
END
Sintaxis
<Result> = <Connection>.InfoDatabaseRights(<User/Group> , <Rights> , <Database> [, <Result 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.
    <Valeur du droit 1> + TAB + ... + TAB + <Valeur du droit 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 user belongs to at least one group to which the relevant rights were 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:
    <Droit considéré 1> + TAB + <Valeur du droit 1> + RC + ...
    <Droit considéré N> + TAB + <Valeur du droit N> + RC

    where:
    • <Relevant rights> corresponds to one of the constants used in the <Rights> parameter.
    • <Value of rights> corresponds to one of the constants:
      hAllowedThe relevant rights are granted to the user or group.
      hForbiddenThe relevant rights are not granted to the user or group.
      hInheritThe user belongs to at least one group to which the relevant rights were granted.
      This constant is returned only if the display mode is not set to hEffective.
<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 must be known.
<Rights>: Constante o combinación de constantes de tipo Integer
List of rights to find:
hRightsAllList of all the rights
We recommend that you use this constant in hDetails or hEffective + hDetails display mode.
hRightsAutoModifRights to perform an automatic modification on a data file.
hRightsBackupRights to perform a backup.
hRightsChangeLinkRights to modify the integrity rules on a data file.
hRightsChangeOwnerRights to modify the owner of an element.
hRightsChangeRightsRights to change rights.
hRightsConnectionRights to connect to a server (encrypted or unencrypted connection).
hRightsCreateFileRights to create a data file (with <Fuente>.Creation).
hRightsCreateViewRights to create a view.
hRightsDebugRights to debug the stored procedures.
hRightsDeleteRights to delete the records from a data file.
hRightsDeleteDBRights to delete a database.
hRightsDeleteFileRights to delete a data file (<Variable Connection>.DeleteFile).
hRightsDeleteViewRights to delete a view.
hRightsEncryptedConnectionRights to connect to a server (encrypted connection only).
hRightsInsertRights to add new records into a data file.
hRightsLockRights to lock the data files or the records of a data file.
hRightsMaintenanceRights to start a re-index operation or to perform statistical calculations on a data file.
hRightsManageDuplicateRights to enable and disable the management of duplicates.
hRightsManageIntegrityRights to enable and disable the management of integrity.
hRightsManageProcedureRights to add, modify and delete the sets of procedures.
hRightsManageTriggerRights to add, enable and delete server triggers.
hRightsNoDatabaseAccessRights to prevent access to a database (<Variable Connection>.NoDatabaseAccess and <Variable Connection>.EndNoDatabaseAccess).
hRightsReadRights to read the records of a data file.
hRightsRunProcedureRights to run a stored procedure.
Novedad versión 2024
hRightsUnmask
Right to de-anonymize anonymized fields in database files.
hRightsUpdateRights to modify the records of a data file.
<Database>: Cadena de caracteres
Name of the database for which the rights are requested.
<Result 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 that will be actually granted to the user or to the group on the database. 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 there value.
Observaciones
To modify the rights of a user or group of users on a database, use <Variable Connection>.ModifyDatabaseRights.
Componente: wd290hf.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: 20/06/2023

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