Skip to content

fix(#3898): session token deletion - #3937

Merged
flovilmart merged 2 commits into
masterfrom
fix/3896
Jun 16, 2017
Merged

flovilmart merged 2 commits into
masterfrom
fix/3896

Conversation

@flovilmart

@flovilmart flovilmart commented Jun 16, 2017 •

Copy link
Copy Markdown
Contributor

Makes sure the user trying to make the delete call on _Session is the one owning it. Props to @pungme for writing the test and getting it started!

@codecov

codecov Bot commented Jun 16, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #3937 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3937      +/-   ##
==========================================
+ Coverage   90.43%   90.48%   +0.05%     
==========================================
  Files         114      114              
  Lines        7682     7686       +4     
==========================================
+ Hits         6947     6955       +8     
+ Misses        735      731       -4
Impacted Files Coverage Δ
src/rest.js 97.33% <100%> (+0.15%) ⬆️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 95.83% <0%> (+0.13%) ⬆️
src/RestWrite.js 93.29% <0%> (+0.19%) ⬆️
src/Routers/SessionsRouter.js 90.24% <0%> (+4.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d79ba1...8efd5cb. Read the comment docs.

@flovilmart
flovilmart requested a review from acinader June 16, 2017 14:57
acinader
acinader previously approved these changes Jun 16, 2017

@acinader acinader left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread spec/ParseUser.spec.js
});

it('cannot update session if invalid or no session token', (done) => {
Parse.Promise.as().then(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. just out of curiosity, why do you need this noop promise?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed per se, but that's how the test was originally written.

Comment thread src/rest.js Outdated

const firstResult = response.results[0];
firstResult.className = className;
if (className == '_Session' && !auth.isMaster) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer === i should prolly get that in lint....surprised it isn't already there.

@acinader acinader left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@flovilmart
flovilmart merged commit 16954c2 into master Jun 16, 2017
@flovilmart
flovilmart deleted the fix/3896 branch June 16, 2017 16:56
@flovilmart flovilmart modified the milestone: 2.5.0 Jun 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants