mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
글쓴이에게는 무조건 세션 권한 부여
비회원 글쓰기 후 본문 페이지에서 비밀번호 인증을 받아야 하기 때문에 매우 번거로움.
This commit is contained in:
parent
5e9273d5f3
commit
2840740286
2 changed files with 23 additions and 8 deletions
|
|
@ -250,15 +250,23 @@ class commentController extends comment
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authorization of the comments
|
* Authorization of the comments
|
||||||
* available only in the current connection of the session value
|
* @param int $comment_srl
|
||||||
|
* @param bool $session
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function addGrant($comment_srl)
|
function addGrant($comment_srl, $session = false)
|
||||||
{
|
{
|
||||||
$comment = getModel('comment')->getComment($comment_srl);
|
$comment = getModel('comment')->getComment($comment_srl);
|
||||||
if ($comment->isExists())
|
if ($comment->isExists())
|
||||||
{
|
{
|
||||||
$comment->setGrant();
|
if ($session)
|
||||||
|
{
|
||||||
|
$comment->setGrantForSession();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$comment->setGrant();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -581,7 +589,7 @@ class commentController extends comment
|
||||||
// grant autority of the comment
|
// grant autority of the comment
|
||||||
if(!$manual_inserted)
|
if(!$manual_inserted)
|
||||||
{
|
{
|
||||||
$this->addGrant($obj->comment_srl);
|
$this->addGrant($obj->comment_srl, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$manual_inserted)
|
if(!$manual_inserted)
|
||||||
|
|
|
||||||
|
|
@ -325,16 +325,23 @@ class documentController extends document
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant a permisstion of the document
|
* Grant a permisstion of the document
|
||||||
* Available in the current connection with session value
|
|
||||||
* @param int $document_srl
|
* @param int $document_srl
|
||||||
|
* @param bool $session
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function addGrant($document_srl)
|
function addGrant($document_srl, $session = false)
|
||||||
{
|
{
|
||||||
$oDocument = getModel('document')->getDocument($document_srl);
|
$oDocument = getModel('document')->getDocument($document_srl);
|
||||||
if ($oDocument->isExists())
|
if ($oDocument->isExists())
|
||||||
{
|
{
|
||||||
$oDocument->setGrant();
|
if ($session)
|
||||||
|
{
|
||||||
|
$oDocument->setGrantForSession();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$oDocument->setGrant();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -530,7 +537,7 @@ class documentController extends document
|
||||||
// return
|
// return
|
||||||
if(!$manual_inserted)
|
if(!$manual_inserted)
|
||||||
{
|
{
|
||||||
$this->addGrant($obj->document_srl);
|
$this->addGrant($obj->document_srl, true);
|
||||||
}
|
}
|
||||||
$output->add('document_srl',$obj->document_srl);
|
$output->add('document_srl',$obj->document_srl);
|
||||||
$output->add('category_srl',$obj->category_srl);
|
$output->add('category_srl',$obj->category_srl);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue