Skip to content

Commit

Permalink
🐛 Fix manage permission
Browse files Browse the repository at this point in the history
  • Loading branch information
kanrichan committed Jan 15, 2021
1 parent 007742f commit dbf8aa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/manage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (manage) GetPluginInfo() zero.PluginInfo { // 返回插件信息
}

func (manage) Start() { // 插件主体
promoteManager := zero.OnRegex("^升为管理.*?(\\d+)", zero.OnlyGroup, zero.AdminPermission).
promoteManager := zero.OnRegex("^升为管理.*?(\\d+)", zero.OnlyGroup, zero.SuperUserPermission).
Handle(
func(matcher *zero.Matcher, event zero.Event, state zero.State) zero.Response {
zero.SetGroupAdmin(event.GroupID, GetInt(state, 1), true)
Expand All @@ -32,7 +32,7 @@ func (manage) Start() { // 插件主体
promoteManager.Priority = 20
promoteManager.Block = true

cancleManager := zero.OnRegex("^取消管理.*?(\\d+)", zero.OnlyGroup, zero.AdminPermission).
cancleManager := zero.OnRegex("^取消管理.*?(\\d+)", zero.OnlyGroup, zero.SuperUserPermission).
Handle(
func(matcher *zero.Matcher, event zero.Event, state zero.State) zero.Response {
zero.SetGroupAdmin(event.GroupID, GetInt(state, 1), false)
Expand Down

0 comments on commit dbf8aa2

Please sign in to comment.