Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit f2b76a5

Browse files
authored
Fix read permission of pulbic item (#298)
1 parent 521b3df commit f2b76a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rest_server/src/controllers/item_controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ function checkReadPermission(userInfo, item) {
1414
if (userInfo.username === item.author) {
1515
return true;
1616
}
17+
if (item.isPublic) {
18+
return true;
19+
}
1720
if (!item.isPrivate && (userInfo.grouplist && item.groupList)) {
1821
for (const group of userInfo.grouplist) {
1922
if (item.groupList.includes(group)) {

0 commit comments

Comments
 (0)