aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app.coffee9
-rw-r--r--views/main/about.html5
2 files changed, 6 insertions, 8 deletions
diff --git a/app.coffee b/app.coffee
index ea2986c7..5ac4b033 100644
--- a/app.coffee
+++ b/app.coffee
@@ -9,7 +9,7 @@ transactions = require("./routes/transactions")
users = require("./routes/users")
RedisStore = require('connect-redis')(express)
-sessionStore = new RedisStore()
+sessionStore = new RedisStore(ttl: 172800)
app = express()
app.enable('trust proxy')
@@ -46,10 +46,9 @@ for route, view of routes
)(route, view)
authorize = (req, res, next) ->
- console.log(req.user)
- return next() if req.isAuthenticated() and
- (req.params.user and req.params.user is req.user.username) or
- req.user.username is 'admin'
+ if req.params.user? is req.user?.username or
+ req.user?.username is 'admin'
+ return next()
res.redirect('/login')
app.get('/setup', calculator.new)
diff --git a/views/main/about.html b/views/main/about.html
index fc8fcd23..42155a33 100644
--- a/views/main/about.html
+++ b/views/main/about.html
@@ -11,10 +11,9 @@
</p>
<p>
- Transactions between bitcoin addresses are
+ New addresses start with a zero balance. Transactions between addresses are
recorded in a public file and <a href="http://blockchain.info/unconfirmed-transactions">published on
- the Internet</a>. The file keeps track of the balance of every
- address. New addresses start with a zero balance.
+ the Internet</a>. Copies of the file are distributed over the bitcoin network which keeps track of the balance at every address.
</p>
<p>