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

Method IsAdministrator

models/member.go:309–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307}
308
309func (m *Member) IsAdministrator() bool {
310 if m == nil || m.MemberId <= 0 {
311 return false
312 }
313 return m.Role == 0 || m.Role == 1
314}
315
316//根据指定字段查找用户.
317func (m *Member) FindByFieldFirst(field string, value interface{}) (*Member, error) {

Callers 15

isReadableFunction · 0.80
EditMethod · 0.80
CreateMethod · 0.80
UploadMethod · 0.80
DeleteMethod · 0.80
ContentMethod · 0.80
HistoryMethod · 0.80
DeleteHistoryMethod · 0.80
RestoreHistoryMethod · 0.80
CompareMethod · 0.80
ReleaseMethod · 0.80
SaveSortMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected