Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix scrutator connection #128

Merged
merged 3 commits into from
Sep 18, 2024
Merged

fix scrutator connection #128

merged 3 commits into from
Sep 18, 2024

Conversation

ajeanneney
Copy link
Collaborator

Issue description :

Scutators cannot connect because of a 403 error on preAssignation request

Describe your changes :

  • authorize scrutators on preAssignation api endpoint
  • hide create preAssignation button for scrutators

How to test :

  • test that scrutators can connect to label and check their acces rights

Checklist before requesting a review

  • I have performed a self-review of my code.
  • The feature works locally.
  • If it's relevant I added tests.
  • Will this be part of a product update? If yes, please write one phrase about this update.

@@ -201,7 +201,7 @@ const controllers: controllersFromSchemaType<typeof apiSchema> = {
}),

preAssignations: buildAuthenticatedController({
permissions: ['admin'],
permissions: ['admin', 'scrutator'],
controllerWithUser: async () =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comme le scrutator n'est pas sensé appeler la route preassignation, ne faudrait 'il pas ajouter une verication du role qui n'appelle cette que quand c'est l'admin...?

<div style={styles.addPreAssignationButton}>
<AddPreAssignationButton refetch={props.refetch} users={props.users} />
</div>
{userRole === 'admin' && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

car il suffit qu'un petit malin s'amuse a jouer avec le localstorage et il aurra accès au preaasignation

Copy link
Collaborator

@Bouba-cassation Bouba-cassation left a comment

Choose a reason for hiding this comment

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

C'est bon pour moi. tout marche bien.

@ajeanneney ajeanneney merged commit c9d7614 into dev Sep 18, 2024
1 check passed
@ajeanneney ajeanneney deleted the fix/scrutator-connection branch September 18, 2024 14:00
s-diallo pushed a commit that referenced this pull request Oct 8, 2024
* fix scrutator authorizations

* show preAssignation menu to scrutator

* remove adminView when disconnect

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
Bouba-cassation pushed a commit that referenced this pull request Oct 29, 2024
* fix scrutator authorizations

* show preAssignation menu to scrutator

* remove adminView when disconnect

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
Bouba-cassation added a commit that referenced this pull request Nov 8, 2024
* adding checklist from annotationReports in statistics collection

* fixing lint

* log/add free documents count logging

* Feat/improve nlp job (#117)

* calculate axios call duration

* timeout to 5 hours on nlp job

* remove console log

* set timetout to 10 min

* finale fix

* timeout on every errors on nlp job

* increase pause after error

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Increase timeout for cleaning job

* Feat/add show modifications options on problem report table (#123)

* add show modifications options on problem report table

* simplify isDisabled condition

* change order

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Clean code and improve documentation (#125)

* remove migrations - unused

* improve readme

* delete unused readme

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Feat/display decision nac (#127)

* add NAO

* show nac or nao in title

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* fix scrutator connection (#128)

* fix scrutator authorizations

* show preAssignation menu to scrutator

* remove adminView when disconnect

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* FEAT_add-docker-local-hot-reload (#124)

* FEAT_add-docker-local-hot-reload

* dockerize label with hot reload & network on sder repository

* fix docker:kill

* reset to give a root docker compose

* complete docker.env.example

* remove useless run_mode set

---------

Co-authored-by: Julien Grach <julien.grach@justice.fr>
Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Feat/multiple line annotations (#122)

* first tests and documentation of what I have try/undertand

* multiline selection by clicking on line numbers

* remove logs

* remove buggy multiline feature

* format

* fine tune annotation tooltip

* fix bug : selecting empty lines

* hightlight selected line

* fix identical line selection

* auto create motivation annotation when use line selection

* add popup when delete motivation annotation

* disable changeCategory and link annotation for motivation

* split text in annotation tooltip if too long

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Feat add docker local hot reload (#130)

* FEAT_add-docker-local-hot-reload

* fix dockerfile npm i

---------

Co-authored-by: Julien Grach <julien.grach@justice.fr>

* Fix/motivation entity (#131)

* customize entityId for motivations

* clean

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Ops add restart policy for cron (#132)

* add restartPolicy on cronjobs

* deploy on dev

* change branch name

* change branch name

* fix ci

* disable branch deploy

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Feat/rework assignation ordering (#119)

* Fix/try fix import (#114)

* j-7 to j-4

* add dateDecision import

* set schedule to not overlap import jobs

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* choose random in old and recent documents

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* Feat/new checklist (#136)

* create new annotationReport type

* handle only new annotationReport

* save checklist only if not empty

* extract checklist rendering

* add viewer mode for checklist

* put chekclist in accordion

* make check clickable

* show lines of concerned selected check

* diplay context lines for checklist

* styling

* add checklist header

* eslint

* simplify annotationReportType

* fix test

* change 'label' to 'category' in nlp response

* update storage-example

* review changes

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* fix IPs (#137)

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* fix: update gitignore .ash-history > .ash_history (#138)

* set admin view on login (#139)

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* addding annotation report if is not null

* harmonisation du typage de la checklist et cleaning code

* resolving commit conflict

* resolving lint

* adding and testing modif from antoine's branch

* removing annotationReportChecklist in sendDocumentPseudonymisationAndTreatments in sderBD

* lint resolving

* resolving changes with antoine's commits

* reverting storage-example 123456 file

* adapting test generator for checklist

* resolving test because checklist generator is random

* small fix

* change annotationReportChecklist to checklist

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
Co-authored-by: Antoine Jeanneney <29945628+ajeanneney@users.noreply.github.com>
Co-authored-by: JulienGrach <julien@grach.fr>
Co-authored-by: Julien Grach <julien.grach@justice.fr>
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