#I8XDG7 修复不能越权删除他人的文章

This commit is contained in:
HDM58\hdm58 2024-01-31 10:49:30 +08:00
parent ac8149cfa2
commit 54cd728b68

View File

@ -238,7 +238,7 @@ class Index extends BaseController
public function delete()
{
$id = get_params("id");
$admin_id = Db::name('Article')->where('id',$id).value('uid');
$admin_id = Db::name('Article')->where('id',$id)->value('uid');
if($admin_id!=$this->uid){
return to_assign(1, "你不是该知识的创建人,没权限删除");
}