This commit is contained in:
zhaoke
2023-09-04 15:28:27 +08:00
parent 3d95c7cdcd
commit 346ce714fd
3 changed files with 21 additions and 8 deletions
+4 -5
View File
@@ -268,10 +268,7 @@ class group extends control
continue;
}
if(!$this->config->inQuickon && in_array("{$priv->module}-{$priv->method}", $this->config->group->hiddenPriv))
{
continue;
}
if(!$this->config->inQuickon && in_array("{$priv->module}-{$priv->method}", $this->config->group->hiddenPriv)) continue;
if(!isset($privList[$priv->parentCode])) $privList[$priv->parentCode] = array();
if(!is_array($privList[$priv->parentCode])) $privList[$priv->parentCode] = array();
@@ -313,6 +310,8 @@ class group extends control
foreach($this->lang->resource->{$module} as $method => $methodLabel)
{
if(isset($privMethods[$module][$method])) continue;
if(!$this->config->inQuickon && in_array("{$module}-{$method}", $this->config->group->hiddenPriv)) continue;
$privMethods[$module][$method] = $method;
$privList[$module][0]["{$module}-$method"] = new stdclass();
@@ -1086,7 +1085,7 @@ class group extends control
$privList = $this->group->getPrivByParent(trim($parentList, ','));
foreach($privList as $privID => $priv)
{
$privList["{$priv->module}-{$priv->method}"] = $priv;
if($this->config->inQuickon || !in_array("{$priv->module}-{$priv->method}", $this->config->group->hiddenPriv)) $privList["{$priv->module}-{$priv->method}"] = $priv;
unset($privList[$privID]);
}
}
+16 -3
View File
@@ -1382,9 +1382,22 @@ $lang->serverroom->methodOrder[15] = 'delete';
$lang->serverroom->methodOrder[20] = 'view';
$lang->resource->instance = new stdclass();
$lang->resource->store = new stdclass();
$lang->resource->space = new stdclass();
$lang->resource->space->browse = 'browse';
$lang->resource->instance->install = 'install';
$lang->resource->instance->view = 'view';
$lang->resource->instance->visit = 'visit';
$lang->resource->instance->ajaxStatus = 'ajaxStatus';
$lang->resource->instance->ajaxStart = 'ajaxStart';
$lang->resource->instance->ajaxStop = 'ajaxStop';
$lang->resource->instance->ajaxUninstall = 'ajaxUninstall';
$lang->resource->instance->upgrade = 'upgrade';
$lang->resource->space = new stdclass();
$lang->resource->space->browse = 'browse';
$lang->resource->space->getStoreAppInfo = 'getStoreAppInfo';
$lang->resource->store = new stdclass();
$lang->resource->store->browse = 'browse';
$lang->resource->store->appView = 'appView';
/* Doc. */
$lang->resource->doc = new stdclass();
+1
View File
@@ -1759,6 +1759,7 @@ class groupModel extends model
->andWhere('t1.edition')->like("%,{$this->config->edition},%")
->andWhere('t1.vision')->like("%,{$this->config->vision},%")
->andWhere('t2.`objectType`')->eq('priv')
->andWhere('t2.lang')->eq($this->app->getClientLang())
->orderBy('order_asc')
->fetchAll('id');
}