[xoops-cvslog 5327] CVS update: xoops2jp/html/modules/user/actions

Back to archive index

Minahito minah****@users*****
2006年 10月 15日 (日) 15:09:39 JST


Index: xoops2jp/html/modules/user/actions/EditUserAction.class.php
diff -u xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.13 xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.13.2.1
--- xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.13	Mon Sep 25 08:10:16 2006
+++ xoops2jp/html/modules/user/actions/EditUserAction.class.php	Sun Oct 15 15:09:39 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package user
- * @version $Id: EditUserAction.class.php,v 1.1.2.13 2006/09/24 23:10:16 minahito Exp $
+ * @version $Id: EditUserAction.class.php,v 1.1.2.13.2.1 2006/10/15 06:09:39 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -68,11 +68,15 @@
 	 */
 	function hasPermission(&$controller, &$xoopsUser, $moduleConfig)
 	{
-		if ($this->mObject != null) {
-			return ($this->mObject->get('uid') == $xoopsUser->get('uid') || $xoopsUser->isAdmin());	//< FIXME
+		if (!is_object($this->mObject)) {
+			return false;
+		}
+
+		if ($controller->mRoot->mContext->mUser->isInRole('Module.user.Admin')) {
+			return true;
 		}
 		
-		return false;
+		return ($this->mObject->get('uid') == $xoopsUser->get('uid'));
 	}
 
 	function _doExecute()


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