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

Method forbidGeneralRole

controllers/BaseController.go:583–589  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

581}
582
583func (this *BaseController) forbidGeneralRole() bool {
584 // 如果只有作者和管理员才能写作的话,那么已创建了书籍的普通用户无法将书籍转为公开或者是私密分享
585 if this.Member.Role == conf.MemberGeneralRole && models.GetOptionValue("ALL_CAN_WRITE_BOOK", "true") != "true" {
586 return true
587 }
588 return false
589}

Callers 3

PrivatelyOwnedMethod · 0.80
CreateTokenMethod · 0.80
CreateTokenMethod · 0.80

Calls 1

GetOptionValueFunction · 0.92

Tested by

no test coverage detected