1
bigmario
permission issue on xoops 2.4....
  • 2009/11/19 19:21

  • bigmario

  • Just popping in

  • Posts: 3

  • Since: 2007/4/25


good afternoon I'm trying to work Xplorer module in XOOPS 2.4 and in the Administration Menu module, when I try to give the respective Permissions to each user group (to move, edit, delete files, etc..) it does't displays any option.

This module works perfectly until version 2.3 of xoops, but I assume that changed the way it manages the Permissions

Here I give you the code that uses Xplorer for managing permissions:

both are placed in the Xplorer/admin folder

"groupperm.php":
<?php

include '../../../include/cp_header.php';
include_once 
XOOPS_ROOT_PATH .'/class/xoopsform/grouppermform.php';
include_once 
'../perms.inc.php';

$title_of_form "Permisos para el Módulo Explorador de Formatos"
$perm_desc 'Seleccione los Permisos de Acceso para los Grupos:';

$form = new XoopsGroupPermForm($title_of_form$module_id$perm_name$perm_desc);
foreach (
$cats as $item_id => $item_name) {
    
$form->addItem($item_id$item_name);
}

//xoops_cp_header();
$xoopsTpl->assign('content',$form->render());
//xoops_cp_footer();

?>


"admin.php":
<?php
// $Id: $
//  ------------------------------------------------------------------------ //
//  ------------------------------------------------------------------------ //
include("admin_header.php");
require_once(
MOD_PATH."/admin/admin_cptabs.php");
/**
* used to hold all page data that is collected for display
* @var    array $post
*/
$page = array();
/**
used to hold an array of submitted data to the page
@var    array $post    
*/
$post = array();
$posterror false
import_request_variables('gp','');
/**
Set up our admin tabs
*/
error_reporting(E_ALL);
// ********************************************************* admin smarty start
global $xoopsModule;
xoops_cp_header();
 require_once 
XOOPS_ROOT_PATH.'/class/template.php';
 if ( !isset(
$xoopsTpl) ) { // Just in case, for new releases    
  
$xoopsTpl = new XoopsTpl();
  
$oldsystem true;
 }else 
$oldsystem false;
 
$xoopsOption['template_main'] = 'admin/admin.html'// To be compatible with existing system.

// ********************************************************* admin smarty start
    
switch ($tab) {
        case 
TAB_PERMS :
                
$mainTabs->setCurrent('permission','tabs');
                
$xoopsTpl->assign('tplpage','groupperm'); 
                include 
"groupperm.php";
                break;
        case 
TAB_INDEX :
        default :
                
$mainTabs->setCurrent('index','tabs');
                break;
    }

    
$xoopsTpl->assign'tabs'$mainTabs->getSet() );

// ********** admin smarty close
$xoopsTpl->assign('mod_dir'$xoopsModule->dirname() );
$xoopsTpl->assign('mod_mid'$xoopsModule->getVar('mid'));

 if (
$oldsystem) { // Don't execute if newer versions has smarty implemented.
  
if (isset($xoopsOption['template_main'])) {
   
$xoopsTpl->xoops_setCaching(0);
   
$xoopsTpl->display('db:'.$xoopsOption['template_main']);
  }
 }

xoops_cp_footer();
// ********************************************************* admin smarty close
?>


perms.inc.php (placed in xplorer folder)
<?php
$perm_name 
'XplorerPerms';
if (
$xoopsUser)  $groups $xoopsUser->getGroups();
else 
$groups XOOPS_GROUP_ANONYMOUS;

$module_id $xoopsModule->getVar("mid");
$gperm_handler = & xoops_gethandler('groupperm');

define('PERM_COPY'1);
define('PERM_MOVE'2);
define('PERM_DELETE'3);
define('PERM_UPLOAD'4);
define('PERM_SEARCH'5);
define('PERM_CREATE'6);
define('PERM_EDITFILE'7);

$cats = array(    '1' => 'Copiar'
                
'2' => 'Mover',
                
'3' => 'Borrar',
                
'4' => 'Cargar',
                
'5' => 'Buscar',
                
'6' => 'Crear',
                
'7' => 'Editar');

?>


if anyone knows how to solve this, or failing that a specific module that manages access permissions, please tell me to study it... Thanks

I'm from Venezuela, so please excuse my english ...bye



2
bigmario
problems with permissions for workflow module in xoops v-2.0.18.1
  • 2008/6/4 16:22

  • bigmario

  • Just popping in

  • Posts: 3

  • Since: 2007/4/25


i'm having a problem with XOOPS v-2.0.18.1 and a workflow module called "xflow", which i got from www.xoopspro.com some time ago, after installing xflow the menu block is visible for registered users, But, even after I grant "all" permissions to registered users, in xflow admin, every link in the xflow menu block returns a XOOPS redirect "you do not have permission to enter this area" page.

This occurs for registered XOOPS user and any group i create, if I add the user to webmaster group then access is granted. This user has been given all the user roles my process inside xflow.

Is there a way to solve this in XOOPS v-2.0.18.1?, cause this happens with every module i create, and i do not have any problems with this in previous versions of XOOPS

i'm from Venezuela...so please excuse my english....

Thanks




TopTop



Login

Who's Online

161 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 161


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits