-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add options to limit anonymous view note #313
Add options to limit anonymous view note #313
Conversation
@elct9620 謝謝你的 PR |
可是現在其實已經有 4 種權限了 |
current permission matrix looks like this:
might consider adding two new permission types - |
@elct9620 What do you think? |
Oops, sorry. |
我自己整理後理解是這樣。
簡單說就是增加 如過確定無誤的話這部分我可以協助修改再送 PR 過來。 |
@elct9620 這樣調整的話,會更改到現在使用同名權限的筆記,我們不能隨意調整現在已有名稱的權限 |
我的意思是這樣:
|
看起來我漏看 Editable 這個項目,這樣看起來應該是沒問題的。 |
@elct9620 好的,請按照上表新增 |
Still in the early stage, feel free to fork or contribute to HackMD. | ||
|
||
Thanks for using! :smile: | ||
|
||
[docker-hackmd](https://github.com/hackmdio/docker-hackmd) | ||
--- | ||
|
||
Before you go too far, here is the great docker repo for HackMD. | ||
Before you go too far, here is the great docker repo for HackMD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove the trailing spaces, it's for line breaks.
HackMD lets you create realtime collaborative markdown notes on all platforms. | ||
Inspired by Hackpad, with more focus on speed and flexibility. | ||
HackMD lets you create realtime collaborative markdown notes on all platforms. | ||
Inspired by Hackpad, with more focus on speed and flexibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove the trailing spaces, it's for line breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看起來是我編輯器會自動清理掉,已經先加回去了。
@@ -25,14 +25,14 @@ You can quickly setup a sample heroku hackmd application by clicking the button | |||
[migration-to-0.5.0](https://github.com/hackmdio/migration-to-0.5.0) | |||
--- | |||
|
|||
We don't use LZString to compress socket.io data and DB data after version 0.5.0. | |||
We don't use LZString to compress socket.io data and DB data after version 0.5.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove the trailing spaces, it's for line breaks.
We've dropped MongoDB after version 0.4.0. | ||
So here is the migration tool for you to transfer the old DB data to the new DB. | ||
We've dropped MongoDB after version 0.4.0. | ||
So here is the migration tool for you to transfer the old DB data to the new DB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove the trailing spaces, it's for line breaks.
@jackycute 目前已經把權限補上,不過因為多了兩個權限需要討論一下 Icon 該用哪個比較恰當。 |
@@ -23,7 +23,7 @@ var logger = require("../logger.js"); | |||
var ot = require("../ot/index.js"); | |||
|
|||
// permission types | |||
var permissionTypes = ["freely", "editable", "locked", "private"]; | |||
var permissionTypes = ["freely", "editable", "locked", "private", "limited", "protected"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer the order from loose to tight, like:
freely
, editable
, limited
, private
, protected
, locked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
@@ -2285,6 +2295,14 @@ function updatePermission(newPermission) { | |||
label = '<i class="fa fa-hand-stop-o"></i> Private'; | |||
title = "Only owner can view & edit"; | |||
break; | |||
case "limited": | |||
label = '<i class="fa fa-hand-shield"></i> Limited'; | |||
title = "Signed people can view and edit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, please use Signed people can view & edit
@@ -19,6 +19,8 @@ | |||
<li class="ui-permission-editable"><a><i class="fa fa-shield fa-fw"></i> Editable - Signed people can edit</a></li> | |||
<li class="ui-permission-locked"><a><i class="fa fa-lock fa-fw"></i> Locked - Only owner can edit</a></li> | |||
<li class="ui-permission-private"><a><i class="fa fa-hand-stop-o fa-fw"></i> Private - Only owner can view & edit</a></li> | |||
<li class="ui-permission-limited"><a><i class="fa fa-shield fa-fw"></i> Limited - Signed people can edit & view</a></li> | |||
<li class="ui-permission-protected"><a><i class="fa fa-hand-stop-o fa-fw"></i> Protected - Only owner can edit</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please re-order the permission from loose to tight, see above.
For more clearly to describe the new permissions, I would like to suggest some wording and icon:
|
Please also modify |
hmm stack icon 確實比較寬胖,我再找找看好了 😢 |
How about:
|
看起來可以接受,再不混淆的情況下這兩個算是蠻明確的 XD |
還有什麼值得注意的地方嗎?好像差不多可以 merge 了 |
目前看起來似乎沒有了, |
只有一點點擔心那個 版本號的話要等 |
|
如果是要以 所以版本方面維持 |
版本號不用動沒關係,我會跟著 |
Ok, 這樣的話我覺得 |
摁,那就 |
Thanks @elct9620, let's merge this. |
And also 86f0b10 |
現在的
HMD_ALLOW_ANONYMOUS
只能限制匿名使用者編輯,但是無法關閉匿名使用者瀏覽筆記。所以增加
HMD_ALLOW_ANONYMOUS_VIEW
權限設定,讓匿名使用者無法看到開放編輯的筆記。不過我個人認爲這個可以再做討論,例如是可以增加原本筆記上的權限選項而不是透過這種全域的方式做覆蓋。