Skip to content

Commit 9e58f2e

Browse files
authored
Merge pull request #19 from back4app/back4app1.0.25
Back4app1.0.25
2 parents 7cf1098 + 6d0a9fe commit 9e58f2e

23 files changed

+358
-200
lines changed

.dockerignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
node_modules
2+
npm-debug.log
3+
*.md
4+
PATENTS
5+
LICENSE
6+
Dockerfile
7+
.dockerignore
8+
.gitignore
9+
.travis.yml
10+
.istanbul.yml
11+
.git
12+
.github
13+
14+
# Build folder
15+
lib/
16+
17+
# Tests
18+
spec/
19+
20+
# IDEs
21+
.idea/

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
22

3-
- [ ] You're running version >=1.0.19 of Parse Dashboard.
3+
- [ ] You're running version >=1.0.23 of Parse Dashboard.
44

5-
- [ ] You're running version >=2.2.24 of Parse Server.
5+
- [ ] You're running version >=2.3.2 of Parse Server.
66

77
- [ ] You've searched through [existing issues](https://github.com/ParsePlatform/parse-dashboard/issues?utf8=%E2%9C%93&q=). Chances are that your issue has been reported or resolved before.
88

CHANGELOG.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,40 @@
22

33
### NEXT RELEASE
44

5-
* Fix: Can't send push to specific user (#561)
5+
* _Contributing to this repo? Add info about your change here to be included in next release_
6+
7+
### 1.0.25
8+
9+
* Improvement: Update and add links to sidebar footer (#661), thanks to [Natan Rolnik](https://github.com/natanrolnik)
10+
* Fix: Don’t call unsupported endpoints in Parse Server (#660), thanks to [Natan Rolnik](https://github.com/natanrolnik)
11+
* Fix: Display correctly Files and GeoPoints in Config (#666), thanks to [Natan Rolnik](https://github.com/natanrolnik)
12+
13+
### 1.0.24
14+
15+
* Improvement: Data browser updates object count when table is filtered (#652), thanks to [Mike Rizzo](https://github.com/rizzomichaelg)
16+
* Improvement: Apps name sorting by name (#654), thanks to [Thilo Schmalfuß](https://github.com/scthi)
17+
* Fix: Fetch jobs list not showing (#656), thanks to [Natan Rolnik](https://github.com/natanrolnik)
18+
19+
### 1.0.23
20+
21+
* Improvement: Enabling web hooks (#584), thanks to [Antonio Davi Macedo Coelho de Castro](https://github.com/davimacedo)
22+
* Improvement: Set autofocus on the username input field (#644), thanks to [Herman Liang](https://github.com/hermanliang)
23+
* Fix: Browser won't render class table with field that contains an object (#623), thanks to [Jordan Haven](https://github.com/jordanhaven)
24+
* Fix: Config FETCH results in 401 (#575), thanks to [Matt Simms](https://github.com/brndmg)
25+
26+
### 1.0.22
27+
28+
* Fix issue affecting logging screen with encrypted passwords, thanks to [lsohn](https://github.com/lsohn)
29+
30+
### 1.0.21
31+
32+
* Fix: Use mountPath for all log in and log out redirects
33+
34+
### 1.0.20
35+
36+
* New: Form based login page instead of basic auth (#562), thanks to [Jeremy Louie](https://github.com/JeremyPlease)
37+
* Fix: Can't send push to specific user (#570), thanks to [Dan VanWinkle](https://github.com/dvanwinkle)
38+
* Fix: Download link in footer menu (#567), thanks to [Pavel Ivanov](https://github.com/pivanov)
639

740
### 1.0.19
841

Parse-Dashboard/Authentication.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ var LocalStrategy = require('passport-local').Strategy;
66

77
/**
88
* Constructor for Authentication class
9-
*
9+
*
1010
* @class Authentication
1111
* @param {Object[]} validUsers
1212
* @param {boolean} useEncryptedPasswords
1313
*/
14-
function Authentication(validUsers, useEncryptedPasswords) {
14+
function Authentication(validUsers, useEncryptedPasswords, mountPath) {
1515
this.validUsers = validUsers;
1616
this.useEncryptedPasswords = useEncryptedPasswords || false;
17+
this.mountPath = mountPath;
1718
}
1819

1920
function initialize(app) {
@@ -57,21 +58,21 @@ function initialize(app) {
5758
app.post('/login',
5859
csrf(),
5960
passport.authenticate('local', {
60-
successRedirect: '/apps',
61-
failureRedirect: '/login',
61+
successRedirect: `${self.mountPath}apps`,
62+
failureRedirect: `${self.mountPath}login`,
6263
failureFlash : true
6364
})
6465
);
6566

6667
app.get('/logout', function(req, res){
6768
req.logout();
68-
res.redirect('/login');
69+
res.redirect(`${self.mountPath}login`);
6970
});
7071
}
7172

7273
/**
7374
* Authenticates the `userToTest`
74-
*
75+
*
7576
* @param {Object} userToTest
7677
* @returns {Object} Object with `isAuthenticated` and `appsUserHasAccessTo` properties
7778
*/
@@ -87,7 +88,7 @@ function authenticate(userToTest, usernameOnly) {
8788
this.validUsers.find(user => {
8889
let isAuthenticated = false;
8990
let usernameMatches = userToTest.name == user.user;
90-
let passwordMatches = this.useEncryptedPasswords ? bcrypt.compareSync(userToTest.pass, user.pass) : userToTest.pass == user.pass;
91+
let passwordMatches = this.useEncryptedPasswords && !usernameOnly ? bcrypt.compareSync(userToTest.pass, user.pass) : userToTest.pass == user.pass;
9192
if (usernameMatches && (usernameOnly || passwordMatches)) {
9293
isAuthenticated = true;
9394
matchingUsername = user.user;
@@ -97,7 +98,7 @@ function authenticate(userToTest, usernameOnly) {
9798

9899
return isAuthenticated;
99100
}) ? true : false;
100-
101+
101102
return {
102103
isAuthenticated,
103104
matchingUsername,

0 commit comments

Comments
 (0)