From e7a33fa0c86800d6445fade28a9dc1119ab20ab9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 13 Mar 2023 05:34:02 +0000 Subject: [PATCH] + Delete all relation when init privs. --- module/group/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/group/model.php b/module/group/model.php index bbc340ed15..40be37dc19 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -995,6 +995,7 @@ class groupModel extends model $this->sortResource(); $resource = json_decode(json_encode($this->lang->resource), true); $this->dao->delete()->from(TABLE_PRIVLANG)->exec(); + $this->dao->delete()->from(TABLE_PRIVRELATION)->exec(); $this->dao->delete()->from(TABLE_PRIV)->exec(); $this->dao->delete()->from(TABLE_CONFIG)->where('module')->eq('priv')->exec(); $this->dbh->exec('ALTER TABLE ' . TABLE_PRIV . ' auto_increment = 1');