Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bc1b31

Browse files
committed
bugfix
1 parent 0345d8b commit 2bc1b31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/logic/common.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,17 @@ func adminCanEdit(entity map[string]interface{}, me *model.Me) bool {
223223
return false
224224
}
225225

226-
func roleCanEdit(typRoleId int, me *model.Me) bool {
226+
func roleCanEdit(typRoleID int, me *model.Me) bool {
227227
if me.IsRoot {
228228
return true
229229
}
230230

231-
if util.InSlice(typRoleId, me.RoleIds) {
232-
return
231+
if util.InSlice(typRoleID, me.RoleIds) {
232+
return true
233233
}
234234

235-
for _, roleId := range me.RoleIds {
236-
if roleId <= model.Administrator {
235+
for _, roleID := range me.RoleIds {
236+
if roleID <= model.Administrator {
237237
return true
238238
}
239239
}

0 commit comments

Comments
 (0)