xoops forums

Anonymous

Posted on: 2008/3/20 9:46
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#11

Re: Formulaire NOPERM for anon users

I test Formulaire 3.33 on XOOPS 16/17/17.1/18/18.1 and same problem ( NOPERM )

blueteen

Quite a regular
Posted on: 2008/3/20 9:52
blueteen
blueteen (Show more)
Quite a regular
Posts: 379
Since: 2004/7/16
#12

Re: Formulaire NOPERM for anon users

Yes, since it is a problem with "formulaire 3.33".
See previous page for temporary solution ! (waiting for an update of this module).

Anonymous

Posted on: 2008/3/20 9:58
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#13

Re: Formulaire NOPERM for anon users

There are no solution in previous page, they just talking about hardcoded lang variable and asking to uninstall this module.

I fix this problem now by upload formulaire.php file from old ver 3.30 and working fine.

blueteen

Quite a regular
Posted on: 2008/3/20 10:09
blueteen
blueteen (Show more)
Quite a regular
Posts: 379
Since: 2004/7/16
#14

Re: Formulaire NOPERM for anon users

These hardcoded lang variable "are" the problem.
https://xoops.org/modules/newbb/viewto ... id=283434#forumpost283434

An uninstall then reinstall is necessary take these changes in account.

Anonymous

Posted on: 2008/3/20 10:09
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#15

Re: Formulaire NOPERM for anon users

I have another solution by editing formulaire.php in ver 3.33 and remove the following lines:

//check if the curent user has the right to see the form

    
$groups is_object$xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
    
$gperm_handler = &xoops_gethandler'groupperm' );

        
$module_handler =& xoops_gethandler('module');
        
$formulaireModule =& $module_handler->getByDirname('formulaire');

        if ( 
$gperm_handler -> checkRight'Droits des categories'$id$groups$formulaireModule->getVar('mid') ) ) {} 
        else 
        {            
redirect_header(XOOPS_URL,1,"NOPERM");
}

//

philou

Quite a regular
Posted on: 2008/10/26 19:26
philou
philou (Show more)
Quite a regular
Posts: 384
Since: 2002/5/6 8
#16

Re: Formulaire NOPERM for anon users

Hi all,

sorry for these issues... I'm working on the new version of the module formulaire... and it correct bugs... I do my best to solve this perm problem is this new version.
Unfortunatly I have lost my internet connexion at home so please be patient... I think this new version will be available at the end of the month.
Resized Image - - Resized Image

Anonymous

Posted on: 2008/10/27 0:54
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#17

Re: Formulaire NOPERM for anon users

Thank you philou

pacho

Quite a regular
Posted on: 2009/10/19 22:45
pacho
pacho (Show more)
Quite a regular
Posts: 235
Since: 2005/6/7 2
#18

Re: Formulaire NOPERM for anon users

Hi there,
Any advance about this issue?

I am having the opposite issue, I want a formulaire not to be available to anonymous users but there is no way to function.
I set permissions but they are ignored.
I have XOOPS 2.3.2 and formulaire 3.3

Regards,

pacho

Quite a regular
Posted on: 2009/10/19 23:43
pacho
pacho (Show more)
Quite a regular
Posts: 235
Since: 2005/6/7 2
#19

Re: Formulaire NOPERM for anon users

This is what I did, and it works:

File: formulaire.php
Quote:
$res_perm = $xoopsDB->query("SELECT gperm_name FROM ".$xoopsDB->prefix("group_permission")." WHERE gperm_modid= ".$module_id." AND gperm_groupid=".$groupuser[0]." AND gperm_itemid=".$id );
if ( $res_perm ) {
while ( $row = $xoopsDB->fetchRow($res_perm)) {
$temp_perm = $row[0];
}
if ($temp_perm == $perm_name) {
// nothing here
} else {
redirect_header( XOOPS_URL . "/user.php", 1, _NOPERM );
exit();
}
}


I change value of $perm_name to my language customized value.

ghia

Community Support Member
Posted on: 2009/10/20 0:19
ghia
ghia (Show more)
Community Support Member
Posts: 4953
Since: 2008/7/3 1
#20

Re: Formulaire NOPERM for anon users

Point is that the text should never been localised or translated. Its definition should stay in the code or in an include file, but not in an language file.
The upcoming v3.34 will also fail on multilangual XOOPS sites.