mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-08 00:14:26 +08:00
添加只读用户角色,不能创建、编辑,只能被设置为观察者 (#992)
* 添加只读用户角色,不能创建、编辑,只能被设置为观察者 * Update markdown.preview.css toc隐藏的时候,article宽度为100% * Update cherry-markdown.css cherry样式,隐藏toc时宽度100% * 发布pdf时候的默认发布者(项目填写了公司名称以公司名称为准) * 验证只读用户权限
This commit is contained in:
@@ -22,6 +22,8 @@ highlight_style="${MINDOC_HIGHLIGHT_STYLE||github}"
|
||||
#大于0时系统会自动检测配置文件是否变动,变动后自动加载并生效,单位是秒。监听端口和数据库配置无效
|
||||
config_auto_delay="${MINDOC_CONFIG_AUTO_DELAY||20}"
|
||||
|
||||
#发布pdf时候的默认发布者(项目填写了公司名称以公司名称为准)
|
||||
publisher_def =
|
||||
|
||||
########Session储存方式##############
|
||||
|
||||
@@ -142,7 +144,7 @@ ldap_base="${MINDOC_LDAP_BASE||dc=example,dc=com}"
|
||||
ldap_user="${MINDOC_LDAP_USER||cn=ldap helper,ou=example.com,dc=example,dc=com}"
|
||||
#第一次绑定ldap用户密码
|
||||
ldap_password="${MINDOC_LDAP_PASSWORD||xxx}"
|
||||
#自动注册用户角色:0 超级管理员 /1 管理员/ 2 普通用户
|
||||
#自动注册用户角色:0 超级管理员 /1 管理员/ 2 普通用户/ 3 只读用户
|
||||
ldap_user_role=${MINDOC_LDAP_USER_ROLE||2}
|
||||
#ldap搜索filter规则,AD服务器: objectClass=User, openldap服务器: objectClass=posixAccount ,也可以定义为其他属性,如: title=mindoc
|
||||
ldap_filter="${MINDOC_LDAP_FILTER||objectClass=posixAccount}"
|
||||
|
@@ -33,6 +33,8 @@ const (
|
||||
MemberAdminRole
|
||||
//普通用户.
|
||||
MemberGeneralRole
|
||||
//只读用户.
|
||||
MemberReaderRole
|
||||
)
|
||||
|
||||
// 系统角色
|
||||
|
@@ -91,6 +91,7 @@ password_length_invalid = The password cannot be empty and must be between 6-50
|
||||
mail_expired = Mail has expired
|
||||
captcha_expired = The verification code has expired, please try again.
|
||||
user_not_existed = User does not exist
|
||||
readusr_only_observer = Read only users can only be set as observers
|
||||
email_not_exist = Email does not exist
|
||||
failed_save_password = Failed to save password
|
||||
mail_service_not_enable = Mail service is not enabled
|
||||
@@ -498,6 +499,7 @@ status = Status
|
||||
super_admin = Super administrator
|
||||
admin = Administrator
|
||||
user = User
|
||||
read_usr = Read-Only User
|
||||
normal = Normal
|
||||
disable = Disable
|
||||
enable = Enable
|
||||
|
@@ -91,6 +91,7 @@ password_length_invalid = Пароль не может быть пустым и
|
||||
mail_expired = почта просрочена
|
||||
captcha_expired = Срок действия капчи истек, попробуйте еще раз
|
||||
user_not_existed = этот пользователь не существует
|
||||
readusr_only_observer = Толькі для чытання карыстальнікаў можна ўсталяваць толькі як назіральнікі
|
||||
email_not_exist = этот адрес электронной почты не существует
|
||||
failed_save_password = Не удалось сохранить пароль
|
||||
mail_service_not_enable = Служба электронной почты не включена
|
||||
@@ -496,6 +497,7 @@ status = Статус
|
||||
super_admin = Супер администратор
|
||||
admin = Администратор
|
||||
user = Пользователь
|
||||
read_usr = Пользователи только для чтения
|
||||
normal = Нормальный
|
||||
disable = Отключено
|
||||
enable = Включено
|
||||
|
@@ -91,6 +91,7 @@ password_length_invalid = 密码不能为空且必须在6-50个字符之间
|
||||
mail_expired = 邮件已失效
|
||||
captcha_expired = 验证码已过期,请重新操作。
|
||||
user_not_existed = 用户不存在
|
||||
readusr_only_observer = 只读用户只能设置为观察者
|
||||
email_not_exist = 邮箱不存在
|
||||
failed_save_password = 保存密码失败
|
||||
mail_service_not_enable = 未启用邮件服务
|
||||
@@ -498,6 +499,7 @@ status = 状态
|
||||
super_admin = 超级管理员
|
||||
admin = 管理员
|
||||
user = 普通用户
|
||||
read_usr = 只读用户
|
||||
normal = 正常
|
||||
disable = 禁用
|
||||
enable = 启用
|
||||
|
Reference in New Issue
Block a user