mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
added 密钥对的删除
This commit is contained in:
parent
963b3be974
commit
2470bcc176
@ -196,15 +196,9 @@ class KeyManager extends Base {
|
||||
public function del(){
|
||||
if( $this->request->isDelete() ){
|
||||
$key = $this->request->delete($this->primaryKey);
|
||||
if(!isAdministrator($key)){
|
||||
$delNum = \app\admin\model\User::destroy($key);
|
||||
if( $delNum ){
|
||||
UserData::destroy(['uid' => $key]);
|
||||
AuthGroupAccess::destroy(['uid' => $key]);
|
||||
$this->success('操作成功!', url('User/index'));
|
||||
}
|
||||
}else{
|
||||
$this->error('管理员不能被删除!');
|
||||
$delNum = Keys::destroy($key);
|
||||
if( $delNum ){
|
||||
$this->success('操作成功!', url('KeyManager/index'));
|
||||
}
|
||||
}
|
||||
$this->error('操作失败!');
|
||||
|
Loading…
x
Reference in New Issue
Block a user