플래닛의 권한 관리 오류 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4891 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-11-19 04:04:12 +00:00
parent 36d8d97ad9
commit dee1a23dc1
4 changed files with 14 additions and 2 deletions

View file

@ -64,7 +64,7 @@
$config->use_signup = Context::get('use_signup');
if($config->use_signup != 'Y') $config->use_signup = 'N';
$grant_list = array('access','create','manager');
$grant_list = array('access','create','manager','write_document');
foreach($grant_list as $key) {
$tmp = trim(Context::get($key));
if(!$tmp) {

View file

@ -45,7 +45,8 @@
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y') return true;
$group_list = $logged_info->group_list;
$group_srls = array_keys($group_list);
if(count($group_list)) $group_srls = array_keys($group_list);
else return false;
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
return false;

View file

@ -37,6 +37,9 @@
if($this->planet->isHome() && !in_array($this->act, array('dispPlanetCreate','dispPlanetLogin','dispPlanetTagSearch','dispPlanetContentSearch','dispPlanetContentTagSearch')) ) {
Context::set('act',$this->act = 'dispPlanetHome');
}
$this->grant->access = $oPlanetModel->isAccessGranted();
$this->grant->create = $oPlanetModel->isCreateGranted();
}
/**
@ -347,6 +350,13 @@
Context::set('reply_list',$output->data);
}
function dispPlanetMessage($msg_code) {
$msg = Context::getLang($msg_code);
if(!$msg) $msg = $msg_code;
Context::set('message', $msg);
$this->setTemplateFile('message');
}
}
?>

View file

@ -14,6 +14,7 @@
<param name="access" target="access" />
<param name="create" target="create" />
<param name="manager" target="manager" />
<param name="write_document" target="write_document" />
<param name="planet_tagtab" target="planet_tagtab" />
<param name="planet_smstag" target="planet_smstag" />
<param name="use_mobile" target="use_mobile" />