Added application and project roles validation for API procedure calls
This commit is contained in:
19
app/Api/Authorization/CommentAuthorization.php
Normal file
19
app/Api/Authorization/CommentAuthorization.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Api\Authorization;
|
||||
|
||||
/**
|
||||
* Class CommentAuthorization
|
||||
*
|
||||
* @package Kanboard\Api\Authorization
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class CommentAuthorization extends ProjectAuthorization
|
||||
{
|
||||
public function check($class, $method, $comment_id)
|
||||
{
|
||||
if ($this->userSession->isLogged()) {
|
||||
$this->checkProjectPermission($class, $method, $this->commentModel->getProjectId($comment_id));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user