* Code for task #89843.

This commit is contained in:
hufangzhou
2023-04-07 13:28:44 +08:00
parent 71981a8847
commit bea4620137
2 changed files with 39 additions and 8 deletions
+11 -2
View File
@@ -2043,12 +2043,12 @@ class groupModel extends model
if(!$this->checkMenuModule($menu, $module)) continue;
if(!isset($this->lang->{$module}->{$methodLabel})) $this->app->loadLang($module);
$key = "{$module}-{$methodLabel}";
$key = "{$module}-{$method}";
$priv = new stdclass();
$priv->module = $module;
$priv->method = $method;
$priv->parent = 0;
$priv->key = $key;
$priv->key = "{$module}-{$methodLabel}";
$priv->parentCode = $module;
$priv->moduleOrder = 0;
$priv->name = $this->lang->{$module}->{$methodLabel};
@@ -2099,4 +2099,13 @@ class groupModel extends model
$privList['depend'] = array_values($privList['depend']);
return $privList;
}
public function getUnassignedPrivsByModule($module)
{
return $this->dao->select('t1.*')->from(TABLE_PRIV)->alias('t1')
->leftJoin(TABLE_PRIVMANAGER)->alias('t2')->on('t1.parent=t2.id')
->where('t2.`code`')->eq($module)
->andWhere('t2.type')->eq('module')
->fetchAll('id');
}
}