mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-24 18:25:01 +08:00
bugfix: 1. 用户管理,用户角色栏文本显示异常;2. 修复非book管理员且非评论作者,但是能删除评论的bug。
This commit is contained in:
@@ -100,8 +100,7 @@ func (m *Relationship) FindForRoleId(bookId, memberId int) (conf.BookRole, error
|
||||
err := o.QueryTable(m.TableNameWithPrefix()).Filter("book_id", bookId).Filter("member_id", memberId).One(relationship)
|
||||
|
||||
if err != nil {
|
||||
|
||||
return 0, err
|
||||
return conf.BookRoleNoSpecific, err
|
||||
}
|
||||
return relationship.RoleId, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user