1- Éditer le fichier scol/partition/dms/admin/loginp4/cloginp4.pkg (faire une sauvegarde).
2- Repérer la fonction "IniDMI" :
fun IniDMI(param)=
let lineextr param -> [PbitmapName[Pcookie[Popen[PbecomeMember[PchangePassword[PforgotPassword _]]]]]] in
(
set BackgroundBitmapName = PbitmapName;
set open = atoi Popen;
set becomeMember = atoi PbecomeMember;
set changePassword = atoi PchangePassword;
set forgotPassword = atoi PforgotPassword;
set cookie = Pcookie;
);
_RSCdownload this BackgroundBitmapName BackgroundBitmapName nil 3; /*begins to download the Bg bitmap at startup*/
_DMSregisterDMI this @activate nil;
let _DMSgetZone this "Text" nil @_resizeT nil ->[win x y w h] in
if (win == nil) then
nil
else
set text = _CRtext _channel win x y w h ET_ALIGN_CENTER|ET_DOWN DMSlogin;
_DMSevent this "in" nil nil;;
3- Avant le dernier " ; " ajouter :
let _getress "login" -> l in
let _getress "password" -> p in
if l != nil then
chklogin l p
else
0;
4- Au final, on a :
fun IniDMI(param)=
let lineextr param -> [PbitmapName[Pcookie[Popen[PbecomeMember[PchangePassword[PforgotPassword _]]]]]] in
(
set BackgroundBitmapName = PbitmapName;
set open = atoi Popen;
set becomeMember = atoi PbecomeMember;
set changePassword = atoi PchangePassword;
set forgotPassword = atoi PforgotPassword;
set cookie = Pcookie;
);
_RSCdownload this BackgroundBitmapName BackgroundBitmapName nil 3; /*begins to download the Bg bitmap at startup*/
_DMSregisterDMI this @activate nil;
let _DMSgetZone this "Text" nil @_resizeT nil ->[win x y w h] in
if (win == nil) then
nil
else
set text = _CRtext _channel win x y w h ET_ALIGN_CENTER|ET_DOWN DMSlogin;
_DMSevent this "in" nil nil;
let _getress "login" -> l in
let _getress "password" -> p in
if l != nil then
chklogin l p
else
0;;
5- Enregistrer et relancer le serveur Scol.
Toutefois cette méthode ne prend pas en compte les cookies éventuels liés àce module.
L'url à utiliser est donc :
scol://adresse_serveur:port/login+toto/password+123456abc
pour se connecter en "toto" avec le mot de passe "123456abc".
]]>Pour l'avoir, il faut modifier le module "login" comme ceci :
1- Éditer le fichier scol/partition/dms/admin/login/loginc.pkg avec un éditeur de texte (style Blocnote / notepad sous Windows). Faire une sauvegarde du fichier (au cas où).
2- Vers la fin du fichier, repérer la fonction "IniDMI" :
fun IniDMI(param)=
_DMSregisterDMI this @activate nil;
let _DMSgetZone this "Button" nil @_resizeI nil ->[win x y w h] in
if win==nil then nil else
set button=_CBbutton _CRbutton _channel win x y w h 0 "Login" @pressbut 0;
let _DMSgetZone this "Text" nil @_resizeT nil ->[win x y w h] in
if win==nil then nil
else set text=_CRtext _channel win x y w h ET_ALIGN_CENTER DMSlogin;;
3- Juste avant le dernier " ; ", ajouter :
let _getress "login" -> l in
if l != nil then
chklogin l nil
else
0;
4- Avoir donc au final :
fun IniDMI(param)=
_DMSregisterDMI this @activate nil;
let _DMSgetZone this "Button" nil @_resizeI nil ->[win x y w h] in
if win==nil then nil else
set button=_CBbutton _CRbutton _channel win x y w h 0 "Login" @pressbut 0;
let _DMSgetZone this "Text" nil @_resizeT nil ->[win x y w h] in
if win==nil then nil
else set text=_CRtext _channel win x y w h ET_ALIGN_CENTER DMSlogin;
let _getress "login" -> l in
if l != nil then
chklogin l nil
else
0;;
5- Enregistrer et relancer le serveur Scol.
Avec une url du type "scol://adresse_du_serveur:port/login+toto", vous devriez être directement connecté sous le nom de "toto" (en supposant que "toto" n'est pas déjà pris par un autre visiteur ou qu'il n'enfreint pas les règles des noms de login).
]]>Si c'est possible avec le type d'url que tu as donné, tu devrais pouvoir te connecter sous le pseudo "blabla"
scol://adr_serv:site/login+pseudo
En tout cas c'était possible, je l'ai déjà fait.
]]>