公会后台登录修改
This commit is contained in:
@@ -239,7 +239,7 @@ class Activities extends Model
|
|||||||
// 添加活动记录
|
// 添加活动记录
|
||||||
$reslut = Db::name('vs_activities_receive')->insert([
|
$reslut = Db::name('vs_activities_receive')->insert([
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
'activities_id' => 1,
|
'activities_id' => 7,
|
||||||
'createtime' => time(),
|
'createtime' => time(),
|
||||||
'updatetime' => time()
|
'updatetime' => time()
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ class Admin extends GuildAdmin
|
|||||||
$this->guildId = Session::get('guild_id');
|
$this->guildId = Session::get('guild_id');
|
||||||
$this->childrenAdminIds = $this->auth->getChildrenAdminIds($this->auth->isSuperAdmin());
|
$this->childrenAdminIds = $this->auth->getChildrenAdminIds($this->auth->isSuperAdmin());
|
||||||
$this->childrenGroupIds = $this->auth->getChildrenGroupIds($this->auth->isSuperAdmin());
|
$this->childrenGroupIds = $this->auth->getChildrenGroupIds($this->auth->isSuperAdmin());
|
||||||
$groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->where('guild_id', $this->guildId)->select())->toArray();
|
if($this->auth->id ==1){
|
||||||
|
$groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->select())->toArray();
|
||||||
|
}else{
|
||||||
|
$groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->where('guild_id', $this->guildId)->select())->toArray();
|
||||||
|
}
|
||||||
Tree::instance()->init($groupList);
|
Tree::instance()->init($groupList);
|
||||||
$groupdata = [];
|
$groupdata = [];
|
||||||
if ($this->auth->isSuperAdmin()) {
|
if ($this->auth->isSuperAdmin()) {
|
||||||
|
|||||||
@@ -293,13 +293,23 @@ class Auth extends \fast\GuildaAuth
|
|||||||
{
|
{
|
||||||
$uid = is_null($uid) ? $this->id : $uid;
|
$uid = is_null($uid) ? $this->id : $uid;
|
||||||
// return parent::getGroups($uid);
|
// return parent::getGroups($uid);
|
||||||
$user_groups = Db::name('vs_guild_admin_auth_group_access')
|
if($uid == 1){
|
||||||
->alias('aga')
|
$user_groups = Db::name('vs_guild_admin_auth_group_access')
|
||||||
->join('fa_vs_guild_admin_auth_group ag', 'aga.group_id = ag.id', 'LEFT')
|
->alias('aga')
|
||||||
->field('aga.uid,aga.group_id,ag.id,ag.pid,ag.name,ag.rules')
|
->join('fa_vs_guild_admin_auth_group ag', 'aga.group_id = ag.id', 'LEFT')
|
||||||
->where("aga.uid='{$uid}' and ag.status='normal'")
|
->field('aga.uid,aga.group_id,ag.id,ag.pid,ag.name,ag.rules')
|
||||||
->where('ag.guild_id', Session::get('guild_id'))
|
->where("aga.uid='{$uid}' and ag.status='normal'")
|
||||||
->select();
|
->select();
|
||||||
|
}else{
|
||||||
|
$user_groups = Db::name('vs_guild_admin_auth_group_access')
|
||||||
|
->alias('aga')
|
||||||
|
->join('fa_vs_guild_admin_auth_group ag', 'aga.group_id = ag.id', 'LEFT')
|
||||||
|
->field('aga.uid,aga.group_id,ag.id,ag.pid,ag.name,ag.rules')
|
||||||
|
->where("aga.uid='{$uid}' and ag.status='normal'")
|
||||||
|
->where('ag.guild_id', Session::get('guild_id'))
|
||||||
|
->select();
|
||||||
|
}
|
||||||
|
|
||||||
$groups[$uid] = $user_groups ?: [];
|
$groups[$uid] = $user_groups ?: [];
|
||||||
return $groups[$uid];
|
return $groups[$uid];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user