mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
添加只读用户角色,不能创建、编辑,只能被设置为观察者 (#992)
* 添加只读用户角色,不能创建、编辑,只能被设置为观察者 * Update markdown.preview.css toc隐藏的时候,article宽度为100% * Update cherry-markdown.css cherry样式,隐藏toc时宽度100% * 发布pdf时候的默认发布者(项目填写了公司名称以公司名称为准) * 验证只读用户权限
This commit is contained in:
@@ -162,6 +162,9 @@ func (c *BlogController) ManageSetting() {
|
||||
bookIdentify := strings.TrimSpace(c.GetString("bookIdentify"))
|
||||
documentId := 0
|
||||
|
||||
if c.Member.Role == conf.MemberReaderRole {
|
||||
c.JsonResult(6001, i18n.Tr(c.Lang, "message.no_permission"))
|
||||
}
|
||||
if blogTitle == "" {
|
||||
c.JsonResult(6001, i18n.Tr(c.Lang, "message.blog_title_empty"))
|
||||
}
|
||||
@@ -286,6 +289,10 @@ func (c *BlogController) ManageEdit() {
|
||||
c.Prepare()
|
||||
c.TplName = "blog/manage_edit.tpl"
|
||||
|
||||
if c.Member.Role == conf.MemberReaderRole {
|
||||
c.JsonResult(6001, i18n.Tr(c.Lang, "message.no_permission"))
|
||||
}
|
||||
|
||||
if c.Ctx.Input.IsPost() {
|
||||
blogId, _ := c.GetInt("blogId", 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user