[xoops-cvslog 4817] CVS update: xoops2jp/html/modules/base/admin/actions

Back to archive index

Minahito minah****@users*****
2006年 10月 6日 (金) 18:46:45 JST


Index: xoops2jp/html/modules/base/admin/actions/HelpAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.15.2.2 xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.15.2.3
--- xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.15.2.2	Thu Oct  5 19:17:53 2006
+++ xoops2jp/html/modules/base/admin/actions/HelpAction.class.php	Fri Oct  6 18:46:45 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: HelpAction.class.php,v 1.1.2.15.2.2 2006/10/05 10:17:53 minahito Exp $
+ * @version $Id: HelpAction.class.php,v 1.1.2.15.2.3 2006/10/06 09:46:45 minahito Exp $
  */
 
  if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -127,16 +127,17 @@
 		$this->mCreateHelpSmarty->register('Legacy_HelpAction.CreateHelpSmarty');
 	}
 	
-	function hasPermission(&$controller, &$xoopsUser)
+	function prepare(&$controller, &$xoopsUser)
 	{
+		parent::prepare($controller, $xoopsUser);
 		$this->_mDirname = xoops_getrequest('dirname');
-		
-		$moduleHandler =& xoops_gethandler('module');
-		$permHandler =& xoops_gethandler('groupperm');
-		
-		$module =& $moduleHandler->getByDirname($this->_mDirname);
-		
-		return $permHandler->checkRight('module_admin', $module->get('mid'), $xoopsUser->getGroups());
+	}
+	
+	function hasPermission(&$controller, &$xoopsUser)
+	{
+		$dirname = xoops_getrequest('dirname');
+		Legacy_RoleManager::loadRolesByDirname($this->_mDirname);
+		return $controller->mRoot->mContext->mUser->isInRole('Module.' . $dirname . '.Admin');
 	}
 	
 	function getDefaultView(&$controller, &$xoopsUser)


xoops-cvslog メーリングリストの案内
Back to archive index