Skip to content

is_user_allowed_to docstring - #1056

Open
armanddidierjean wants to merge 1 commit into
mainfrom
is_user_allowed_to
Open

is_user_allowed_to docstring#1056
armanddidierjean wants to merge 1 commit into
mainfrom
is_user_allowed_to

Conversation

@armanddidierjean

Copy link
Copy Markdown
Member

Description

Summary

Explain that users need at least one valid permission to access the endpoint

Replace += by extend as addition between lists is considered a bad practice in terms of performance

Classification

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 🔨 Refactor (non-breaking change that neither fixes a bug nor adds a feature)
  • 🔧 Infra CI/CD (changes to configs of workflows)
  • 💥 BREAKING CHANGE (fix or feature that require a new minimal version of the front-end)
  • 😶‍🌫️ No impact for the end-users

Impact & Scope

  • Core functionality changes
  • Single module changes
  • Multiple modules changes
  • Database migrations required
  • Other: ...

Testing

  • 1. Tested this locally
  • 2. Added/modified tests that pass the CI (or tested in a downstream fork)
  • 3. Tested in a deployed pre-prod
  • 0. Untestable (exceptionally), will be tested in prod directly

Documentation

  • Updated the docs accordingly :
  • " Docstrings
  • # Inline comments
  • No documentation needed

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.99%. Comparing base (e9b5f53) to head (59c042a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1056   +/-   ##
=======================================
  Coverage   84.99%   84.99%           
=======================================
  Files         220      220           
  Lines       16273    16273           
=======================================
  Hits        13831    13831           
  Misses       2442     2442           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread app/dependencies.py
* make sure the user has the permission with the given name
* return the corresponding user `models_users.CoreUser` object

The user need to have at least ONE of the permissions in the list to be allowed to access the endpoint.

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.

"The user needs" with a final "s"

Maybe also add the words "logical OR" to be even more direct.

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