* commonModel: allow user to access the main method of block module without privilege.

This commit is contained in:
liugang
2024-04-03 14:42:23 +08:00
parent ff379708e6
commit 04b2bf3d71
+1 -1
View File
@@ -397,7 +397,7 @@ class commonModel extends model
if($this->loadModel('user')->isLogon() or ($this->app->company->guest and $this->app->user->account == 'guest'))
{
if(stripos($method, 'ajax') !== false) return true;
if($module == 'block' && stripos(',admin,set,delete,sort,resize,dashboard,dynamic,welcome,contribute,printblock,guide,close,', ",{$method},") !== false) return true;
if($module == 'block' && stripos(',admin,set,delete,sort,resize,dashboard,dynamic,welcome,contribute,printblock,main,guide,close,', ",{$method},") !== false) return true;
if($module == 'my' and $method == 'guidechangetheme') return true;
if($module == 'misc' and $method == 'downloadclient') return true;
if($module == 'misc' and $method == 'changelog') return true;