FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
WEBDEV 20 - to get group within user groupware
WEBDEV 20 - to get group within user groupware
Débuté par PETER ZHOU, 13 mai 2017 09:32 - 3 réponses
Connectez-vous…
PETER ZHOU
#1
Posté le 13 mai 2017 - 09:32
Hi,
I am using 'gpwAddUser(clUser)' to add the login user.
But how do i add/assign the group within the groupware ?
Regards,
PETER ZHOU
Signaler
0
0
GuenterP
#2
Posté le 13 mai 2017 - 15:50
Hi Peter,
complexity takes its toll ... as you've seen, in Groupware the user's structure doesn't contain a "group" member. This is because on one hand in PC Soft's Groupware a group can be part of another group that itself can be part of another group and so on ... on the other hand a user may not be part of any group. So, rights can be attributed to a group or a single user.
However, the function gpwGetUserInfo(gpwInfoGroup) comes to rescue you!
Signaler
0
0
PETER ZHOU
#3
Posté le 13 mai 2017 - 22:03
Quote
GuenterP
Hi Peter,
complexity takes its toll ... as you've seen, in Groupware the user's structure doesn't contain a "group" member. This is because on one hand in PC Soft's Groupware a group can be part of another group that itself can be part of another group and so on ... on the other hand a user may not be part of any group. So, rights can be attributed to a group or a single user.
However, the function gpwGetUserInfo(gpwInfoGroup) comes to rescue you!
Hi Guenter,
'gpwGetUserInfo(gpwInfoGroup)' is to get the current logon user's group.
I would like to assign the group (which we have fixed to a certain group) when i add the user, how do i do that ?
Regards,
Peter Zhou
Signaler
0
0
GuenterP
#4
Posté le 14 mai 2017 - 07:25
Hi Peter,
afaik there's no cheap solution to get at any user's group without logging her/him in. In fact a user can be member of several groups! There are numerous other problems buried in Groupware. As long as you keep to what it is made for, you're safe. Maybe you can find a code snippet in the groupware's component code to retrieve the group? Just a suggestion:
PROCEDURE GPU_sGetUserGroups(nUserId is int) sListGroups is string UNICODE // browse the groups of the user HFilter(GPU_User_Group,UserID,nUserId,nUserId) FOR EACH GPU_User_Group ON UserID // retrieve information about the group HReadSeekFirst(GPU_Group,IDGroup,GPU_User_Group.IDGroup) IF HFound(GPU_Group) THEN IF sListGroups<>“” THEN sListGroups+=TAB sListGroups+=GPU_Group.Name END END HDeactivateFilter(GPU_User_Group) RESULT sListGroups
If it starts to become nasty, I recommend to write your own groupware. This takes a week but then you're playing by your own rules.
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte