4D v16.3

User in group

Accueil

 
4D v16.3
User in group

User in group 


 

User in group ( nomUtilisateur ; groupe ) -> Résultat 
Paramètre Type   Description
nomUtilisateur  Chaîne in Nom de l'utilisateur
groupe  Chaîne in Nom du groupe
Résultat  Booléen in Vrai = utilisateur est dans groupe Faux = utilisateur n'est pas dans groupe

La fonction User in group retourne Vrai si utilisateur appartient au groupe.

Exemple  

L'exemple suivant recherche des factures. Si l'utilisateur courant est dans le groupe Administration, il pourra accéder aux formulaires qui affichent des informations confidentielles. Sinon, des formulaires standard sont affichés :

 QUERY([Factures];[Factures]Prix>100)
 If(User in group(Current user;"Administration")
    FORM SET OUTPUT([Factures];"Confidentiel_Sortie")
    FORM SET INPUT([Factures];"Conf_Saisie")
 Else
    FORM SET OUTPUT([Factures];"Sortie_Standard")
    FORM SET INPUT([Factures];"Entrée_Standard")
 End if
 MODIFY SELECTION([Factures];*)



Voir aussi  

Current user

 
PROPRIÉTÉS 

Produit : 4D
Thème : Utilisateurs et groupes
Numéro : 338

 
HISTORIQUE 

Créé : < 4D v6

 
UTILISATION DE L'ARTICLE

4D - Langage ( 4D v16)
4D - Langage ( 4D v16.1)
4D - Langage ( 4D v16.2)
4D - Langage ( 4D v16.3)