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