Skip to content

Commit f8e5b54

Browse files
committed
Remove temporary change
1 parent 9a23fec commit f8e5b54

3 files changed

Lines changed: 0 additions & 6 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Environment variables (will overwrite other server configs)
125125
| HMD_URL_ADDPORT | `true` or `false` | set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set) |
126126
| HMD_USECDN | `true` or `false` | set to use CDN resources or not (default is `true`) |
127127
| HMD_ALLOW_ANONYMOUS | `true` or `false` | set to allow anonymous usage (default is `true`) |
128-
| HMD_ALLOW_ANONYMOUS_VIEW | `true` or `false` | set to allow anonymous view note (default is `true`) |
129128
| HMD_ALLOW_FREEURL | `true` or `false` | set to allow new note by accessing not exist note url |
130129
| HMD_DB_URL | `mysql://localhost:3306/database` | set the db url |
131130
| HMD_FACEBOOK_CLIENTID | no example | Facebook API client id |

lib/config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ var urladdport = process.env.HMD_URL_ADDPORT ? (process.env.HMD_URL_ADDPORT ===
2020
var usecdn = process.env.HMD_USECDN ? (process.env.HMD_USECDN === 'true') : ((typeof config.usecdn === 'boolean') ? config.usecdn : true);
2121

2222
var allowanonymous = process.env.HMD_ALLOW_ANONYMOUS ? (process.env.HMD_ALLOW_ANONYMOUS === 'true') : ((typeof config.allowanonymous === 'boolean') ? config.allowanonymous : true);
23-
var allowanonymousView = process.env.HMD_ALLOW_ANONYMOUS_VIEW ? (process.env.HMD_ALLOW_ANONYMOUS_VIEW === 'true') : ((typeof config.allowanonymousView === 'boolean') ? config.allowanonymousView : true);
2423

2524
var allowfreeurl = process.env.HMD_ALLOW_FREEURL ? (process.env.HMD_ALLOW_FREEURL === 'true') : !!config.allowfreeurl;
2625

@@ -129,7 +128,6 @@ module.exports = {
129128
serverurl: getserverurl(),
130129
usecdn: usecdn,
131130
allowanonymous: allowanonymous,
132-
allowanonymousView: allowanonymousView,
133131
allowfreeurl: allowfreeurl,
134132
dburl: dburl,
135133
db: db,

lib/response.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ function checkViewPermission(req, note) {
123123
else
124124
return true;
125125
} else {
126-
if(!config.allowanonymousView && !req.isAuthenticated()) {
127-
return false;
128-
}
129126
return true;
130127
}
131128
}

0 commit comments

Comments
 (0)