Skip to content

Add security admin scope requirement on accesses routes#104

Merged
frgfm merged 4 commits into
masterfrom
fix-scope-accesses
Mar 18, 2021
Merged

Add security admin scope requirement on accesses routes#104
frgfm merged 4 commits into
masterfrom
fix-scope-accesses

Conversation

@jean-pasquier

Copy link
Copy Markdown
Contributor

Accesses routes were accessible without any security requirement. Added admin scope requirement to all accesses routes

@codecov

codecov Bot commented Dec 12, 2020

Copy link
Copy Markdown

Codecov Report

Merging #104 (d158c20) into master (a139a8c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #104      +/-   ##
==========================================
+ Coverage   88.31%   88.32%   +0.01%     
==========================================
  Files          27       27              
  Lines         787      788       +1     
==========================================
+ Hits          695      696       +1     
  Misses         92       92              
Flag Coverage Δ
unittests 88.32% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/api/routes/accesses.py 100.00% <100.00%> (ø)

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 a139a8c...430f3bb. Read the comment docs.

fe51
fe51 previously approved these changes Dec 13, 2020
@fe51

fe51 commented Dec 13, 2020

Copy link
Copy Markdown
Member

Thanks for the quick PR !

@frgfm frgfm added this to the 0.1.2 milestone Dec 13, 2020

@frgfm frgfm 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.

Thanks for the PR! Small question/comment about where the scope constraint of the functions should be made, but the scopes on pure routes are fine by me!

Comment thread src/app/api/routes/accesses.py Outdated

@frgfm frgfm 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.

Thanks, the codebase looks perfect to me now! Could you add a short unittest to test the behaviour please?

@frgfm

frgfm commented Mar 10, 2021

Copy link
Copy Markdown
Member

@jeanpasquier75 ? 🙏

@frgfm

frgfm commented Mar 14, 2021

Copy link
Copy Markdown
Member

Strange, I just checked, the unittests for accesses routes should fail. In the mock access table, there are only accesses with "me" scope. But the tests do pass 🤔

@frgfm frgfm mentioned this pull request Mar 14, 2021
9 tasks
@jean-pasquier

Copy link
Copy Markdown
Contributor Author

Strange, I just checked, the unittests for accesses routes should fail. In the mock access table, there are only accesses with "me" scope. But the tests do pass 🤔

I do agree it is weird ahah, I am not really familiar with the mocking access part

@frgfm frgfm 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.

Since #119 was opened, let's move on with this PR!

@frgfm
frgfm merged commit 2612794 into master Mar 18, 2021
@frgfm
frgfm deleted the fix-scope-accesses branch March 18, 2021 16:06
@frgfm frgfm added the type: improvement New feature or request label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants