PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Groupware
Groupware
Débuté par Rich Scheuermann, 06 sep. 2005 23:28 - 3 réponses
Posté le 06 septembre 2005 - 23:28
Can Groupware be set up to limit items in a table based on the user's rights?
For instance I am beginning to set up a project management system with the projects in an HyperFile, and I want to restrict what projects are shown based on a user's access rights.
Thanks
Posté le 07 septembre 2005 - 01:45
G'day Rich
Short answer - No
Check the forum for other Groupware threads as there are some other issues to consider in the groupware implementation.
The groupware will tell you who the surrent user is and which group so you can use that info to check access rights for specific projects within your own access table.
Regards
Al
Posté le 07 septembre 2005 - 02:16
Can Groupware be set up to limit items in a table based on the user's rights?
For instance I am beginning to set up a project management system with the projects in an HyperFile, and I want to restrict what projects are shown based on a user's access rights.
Thanks

Hi Rich,
not straight from groupware because groupware just deals with controls. It enumerates them, window by window. Thereafter, the supervisor can define which of the user groups can see / use these controls.
There is a way to use the groups and or users in a parallel file to store additional information pertaining to the group or to the user. Using the command gpwGetUserInfo(..) you can retrieve name and group name of the current user.
I added a button to the GPWAssociationConfiguration window calling my own 'rights window' which stores its data in a separate file. Only key for accessing this file is the user name (in my case) but could be the group name as well. There are even two files thinkable, one for users and another one for groups. Now, this file is in my analysis and later on, whenever I wish, I can interrogate this file and retrieve additional rights not previously thought of by the makers of groupware.
Kind regards,
Guenter
P.S. Since you'll need your own analysis within that window you have to load it in order to be able to read/write your own file. My code there looks like:

// Analyse von BackExtra öffnen
IF fDir(fExeDir+"\BackExtra8Analyse.wdd",frFile) = True THEN
IF HOpenAnalysis(fExeDir+"\BackExtra8Analyse.wdd", "") = False THEN
Error("Fehler beim Öffnen der Analyse BackExtra8Analyse.wdd: ",HError())
END
ELSE
// Die Analyse BackExtra8Analyse.wdd konnte im Verzeichnis der exe-Dateien nicht gefunden werden
// finde / durchsuche nun das Verzeichnis unterhalb des gegenwärtigen Verzeichnisses
// das Ergebnis ist bereits inklusive letztem \
AnalyseDir = Left(fExeDir,Position(fExeDir,"\",Length(fExeDir),FromEnd))
IF HOpenAnalysis(AnalyseDir+"BackExtra8Analyse.wdd", "") = False THEN
// Es hilft alles nix, es muß händisch gesucht werden!
IF HOpenAnalysis("C:\My Projects\BackXtraFinal\BackExtra8Analyse.wdd","") = False THEN
AnalyseDir = fSelect(fExeDir, "BackExtra8Analyse.wdd", "Suchen Sie die Analyse-Datei 'BackExtra8Analyse.wdd'", "AnalyseDatei(*.wdd)"+TAB+"*.wdd", "wdd", fselOpen+fselExist)
IF HOpenAnalysis(AnalyseDir, "") = False THEN
Error("Analyse nicht gefunden!")
END
END
END
END
// Wenns die Datei noch nicht gibt ..
HCreationIfNotFound(BXSCHNELLWAHL)

Sorry, it's all in German
Posté le 07 septembre 2005 - 19:02
Al, Guenter,
Thanks for the answers, I will investigate.
Rich
G'day Rich
Short answer - No
Check the forum for other Groupware threads as there are some other issues to consider in the groupware implementation.
The groupware will tell you who the surrent user is and which group so you can use that info to check access rights for specific projects within your own access table.
Regards
Al