wiki-security-passportjs 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-security-passportjs",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Security plugin for Federated Wiki, using passport.js",
5
5
  "author": "Paul Rodwell <paul.rodwell@btinternet.com> (http://rodwell.me)",
6
6
  "license": "MIT",
@@ -408,7 +408,7 @@ module.exports = exports = (log, loga, argv) ->
408
408
  res.header 'Access-Control-Allow-Origin', req.get('Origin')||'*'
409
409
  res.header 'Access-Control-Allow-Credentials', 'true'
410
410
  # protect unclaimed by adding "add owner isnt ''" - maybe via parameter
411
- return next() if isAuthorized(req) or allowedToView(req)
411
+ return next() if (isAuthorized(req) and owner !== '') or allowedToView(req)
412
412
  return res.redirect("/view/#{m[1]}") if m = req.url.match /\/(.*)\.html/
413
413
  return res.json(['Login Required']) if req.url == '/system/sitemap.json'
414
414