ncbo / ontologies_api

Hypermedia API for NCBO's ontology-related projects
http://data.bioontology.org
Other
25 stars 10 forks source link

Feature: enforce user creation security #131

Closed syphax-bouazzouni closed 8 months ago

syphax-bouazzouni commented 9 months ago

This PR enforces the user creation/deletion security.

Now only an admin user can create an admin user or update a user to an admin, and only admin users can delete another user.

More detail can be found in the added tests.

codecov-commenter commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2c3cba8) 71.85% compared to head (6e68eaf) 71.88%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #131 +/- ## =========================================== + Coverage 71.85% 71.88% +0.02% =========================================== Files 52 52 Lines 2878 2881 +3 =========================================== + Hits 2068 2071 +3 Misses 810 810 ``` | [Flag](https://app.codecov.io/gh/ncbo/ontologies_api/pull/131/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ncbo) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ncbo/ontologies_api/pull/131/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ncbo) | `71.88% <100.00%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ncbo#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

alexskr commented 9 months ago

@syphax-bouazzouni, when making pull requests against develop branch, ideally we should keep gem branch specifier set at develop in the Gemfile
in this case, is there a way to remove [0402dc4] (https://github.com/ncbo/ontologies_api/pull/131/commits/0402dc47970e18271930cf648f023e590615f9d2) commit?

syphax-bouazzouni commented 9 months ago

@syphax-bouazzouni, when making pull requests against develop branch, ideally we should keep gem branch specifier set at develop in the Gemfile in this case, is there a way to remove [0402dc4] (0402dc4) commit?

Done, Sorry for that, it was because I started my branch from master not develop.