MCPcopy Index your code
hub / github.com/TruthHun/BookStack / ResolveRoleName

Method ResolveRoleName

models/member.go:245–256  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243}
244
245func (m *Member) ResolveRoleName() {
246 switch m.Role {
247 case conf.MemberSuperRole:
248 m.RoleName = "超级管理员"
249 case conf.MemberAdminRole:
250 m.RoleName = "管理员"
251 case conf.MemberGeneralRole:
252 m.RoleName = "读者"
253 case conf.MemberEditorRole:
254 m.RoleName = "作者"
255 }
256}
257
258//根据账号查找用户.
259func (m *Member) FindByAccount(account string) (*Member, error) {

Callers 10

ChangeMemberRoleMethod · 0.95
LoginMethod · 0.95
ldapLoginMethod · 0.95
AddMethod · 0.95
FindMethod · 0.95
FindByAccountMethod · 0.95
FindToPagerMethod · 0.95
PrepareMethod · 0.45
AddMemberMethod · 0.45
ChangeRoleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected