function get_execute_privilege(&$controller, &$request, &$user) { $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 本人はOK if ($user->hasCredential('USER_PAGE_OWNER')) { return true; } // 書込み本人はOK $diary_comment_row = ACSDiary::get_diary_comment_row($request->getParameter('diary_comment_id')); if ($acs_user_info_row['user_community_id'] == $diary_comment_row['user_community_id']) { return true; } return false; }