Skip to content

改进内核只读模式 #7615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ylsislove opened this issue Mar 9, 2023 · 7 comments
Closed

改进内核只读模式 #7615

ylsislove opened this issue Mar 9, 2023 · 7 comments
Assignees
Milestone

Comments

@ylsislove
Copy link
Contributor

在什么情况下你需要该特性?In what scenarios do you need this feature?

我用docker部署了一个思源笔记,里面记录了我想公开展示的笔记内容。查阅了用户指南,发现内核参数提供了一个readonly模式,尝试了一下,发现很符合我的需求。但也存在一些小问题,主要是在指定了readonly模式下:

  1. 用户仍可以点击“数据同步”按钮来登录账号;
  2. 当用户点击了“免费试用订阅”按钮后,可以打开设置界面,从而修改一系列的设置;
  3. 用户点击“帮助”按钮后,会打开思源笔记用户指南,但这个指南笔记本又无法在readonly模式下关闭或删除;

描述可能的最优解决方案 Describe the optimal solution

  • 当部署时指定readonly模式后,希望能像下拉菜单中隐藏“设置”、“日记”和“闪卡”那样,将“数据同步”按钮和“免费试用订阅”按钮隐藏掉,或者是将其功能禁用,从而防止他人用户登陆账号或打开设置界面进行修改;
  • 如何可以的话,希望能将“锁屏”、“数据历史”和“帮助”菜单项在readonly模式也隐藏掉,因为这几个菜单项在只读模式下用处也不大。

描述候选的解决方案 Describe the candidate solution

如果无法隐藏,功能禁用掉也可以。尤其是点击“免费试用订阅”按钮后可以打开设置界面的这个,如果被他人修改了设置就太糟心了🤣

其他信息 Other information

No response

@88250 88250 changed the title docker部署指定readonly模式后,界面顶部能否隐藏“数据同步”按钮和“免费试用订阅按钮”,从而防止他人登录账号或修改配置 改进内核只读模式 Mar 10, 2023
@88250 88250 added this to the 2.7.9 milestone Mar 10, 2023
@88250
Copy link
Member

88250 commented Mar 10, 2023

界面隐藏

  • 锁屏
  • 数据历史
  • 数据同步按钮
  • 订阅按钮
  • 编辑器只读模式按钮
  • 外观模式按钮

内核接口

  • 重新梳理接口只读授权

88250 added a commit that referenced this issue Mar 10, 2023

Verified

This commit was signed with the committer’s verified signature.
88250 added a commit that referenced this issue Mar 10, 2023
88250 added a commit that referenced this issue Mar 10, 2023
88250 added a commit that referenced this issue Mar 10, 2023

Verified

This commit was signed with the committer’s verified signature.
88250 added a commit that referenced this issue Mar 10, 2023
Vanessa219 added a commit that referenced this issue Mar 10, 2023
@88250 88250 closed this as completed Mar 10, 2023
@Vanessa219
Copy link
Member

  • 移动端
  • 标签排序

Vanessa219 added a commit that referenced this issue Mar 10, 2023
@ylsislove
Copy link
Contributor Author

谢谢D大和V姐💕,我还有个想法,就是在只读模式下能否冻结conf.json的修改。比如说用户A在浏览器打开了思源笔记,然后调整了文档树的宽度,当用户B也打开思源笔记后,文档树的宽度也会和A的一样了。
我追踪了一下,发现每次调整宽度或激活/关闭标签页,都会对应修改conf.json。在只读模式下我不想将变动记录到conf.json,从而可以让所有用户浏览笔记本都保持独立,这个可以做到吗

@88250
Copy link
Member

88250 commented Mar 10, 2023

@ylsislove 现在的版本应该就是这样,数据不会被持久化的。

@ylsislove
Copy link
Contributor Author

@88250 刚尝试了一下,确实没有被持久化,挺完美的了哈哈,非常感谢!

@luo-chuan
Copy link

可否增加一个只读端口呢?

原文: https://ld246.com/article/1677729145741

@88250
Copy link
Member

88250 commented Mar 11, 2023

@luo-chuan 现阶段不考虑引入多人权限机制。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants