Skip to content

Save the scope of an auth token in the session - #3526

Merged
rullzer merged 2 commits into
masterfrom
token-save-scope
Apr 5, 2017
Merged

Save the scope of an auth token in the session#3526
rullzer merged 2 commits into
masterfrom
token-save-scope

Conversation

@icewind1991

Copy link
Copy Markdown
Member

And re-use the saved scope when no other scope has been set

@icewind1991icewind1991 added the 3. to review Waiting for reviews label Feb 17, 2017
@icewind1991icewind1991 added this to the Nextcloud 12.0 milestone Feb 17, 2017
@icewind1991
icewind1991force-pushed the token-save-scope branch 2 times, most recently from eb6dedc to 06200c2CompareFebruary 17, 2017 15:01
@codecov-io

codecov-io commented Feb 17, 2017

Copy link
Copy Markdown

Codecov Report

Merging #3526 into master will increase coverage by 0.18%.
The diff coverage is 88.57%.

@@ Coverage Diff @@## master #3526 +/- ##
============================================
+ Coverage 54.03% 54.21% +0.18% + Complexity 21300 21199 -101 
============================================
Files 1259 1306 +47 Lines 74227 80571 +6344 Branches 0 1250 +1250 ============================================
+ Hits 40110 43684 +3574 - Misses 34117 36887 +2770
Impacted FilesCoverage ΔComplexity Δ
lib/private/Server.php92.62% <100%> (-0.36%)120 <0> (ø)
lib/private/User/Session.php73.16% <81.25%> (+0.4%)111 <0> (ø)⬇️
lib/private/Lockdown/LockdownManager.php95.45% <93.75%> (-4.55%)9 <5> (+4)
apps/files/lib/AppInfo/Application.php0% <0%> (-100%)2% <0%> (ø)
apps/provisioning_api/lib/AppInfo/Application.php0% <0%> (-100%)6% <0%> (ø)
lib/private/Template/SCSSCacher.php0% <0%> (-76.6%)17% <0%> (-5%)
apps/files_trashbin/appinfo/app.php0% <0%> (-60%)0% <0%> (ø)
apps/files_sharing/appinfo/app.php0% <0%> (-43.91%)0% <0%> (ø)
apps/user_ldap/lib/Proxy.php7.35% <0%> (-39.62%)21% <0%> (+2%)
apps/federation/lib/AppInfo/Application.php27.27% <0%> (-39.4%)10% <0%> (ø)
... and 316 more

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 00558de...1d3e391. Read the comment docs.

@LukasReschkeLukasReschke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll add an integration test to that before we merge it.

$session = $this->getSession();
$sessionScope = $session->get('token_scope');
if ($sessionScope) {
$this->scope = $sessionScope;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not covered by tests :)

@MorrisJobkeMorrisJobke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Feb 23, 2017
icewind1991and others added 2 commits April 5, 2017 17:58
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>

@LukasReschkeLukasReschke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added integration tests for this with 1d3e391. Let's see if they pass :)

@rullzer
rullzer merged commit 56797fd into masterApr 5, 2017
@rullzer
rullzer deleted the token-save-scope branch April 5, 2017 20:05
@LukasReschke

Copy link
Copy Markdown
Member

stable11: #4225

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@icewind1991@codecov-io@LukasReschke@rullzer@MorrisJobke