Added application and project roles validation for API procedure calls
This commit is contained in:
@@ -72,6 +72,22 @@ class TaskFileModel extends FileModel
|
||||
return self::EVENT_CREATE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get projectId from fileId
|
||||
*
|
||||
* @access public
|
||||
* @param integer $file_id
|
||||
* @return integer
|
||||
*/
|
||||
public function getProjectId($file_id)
|
||||
{
|
||||
return $this->db
|
||||
->table(self::TABLE)
|
||||
->eq(self::TABLE.'.id', $file_id)
|
||||
->join(TaskModel::TABLE, 'id', 'task_id')
|
||||
->findOneColumn(TaskModel::TABLE . '.project_id') ?: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle screenshot upload
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user