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

[Frontend/Backend] split cpapabilites Data Sharing & Ingestion into 3 + manage CSV + Bypass ref + Connector Api (#7428) #7149

Merged
merged 37 commits into from
Jun 20, 2024

Conversation

frapuks
Copy link
Member

@frapuks frapuks commented May 28, 2024

Proposed changes

MAJOR :

  • Create capabilities : "Access Ingestion", "Manage Ingestion"
  • Update "Access data sharing & ingestion" into "Access data sharing"
  • Update "Manage data sharing & ingestion" into "Manage data sharing"
  • Update acces rights for ingestion pages and queries
  • Replace "Manage CSV mappers" without parent capability

MINOR :

  • Add translation for capabilities and manage uppercase
  • Update "Bypass ref" : name, order and description
  • Replace "Connector Api usage" after (not under) "Access connector"

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

Capabilities properties :

  • description : string displayed in the frontend
  • attribute order : determines the display order
  • name : string built from parent capabilities and used in the platform to check access rights

Access Ingestion

  • Access ingestions pages

Manage Ingestion

  • Access ingestions pages
  • CRUD

@frapuks frapuks added the filigran team use to identify PR from the Filigran team label May 28, 2024
@frapuks frapuks self-assigned this May 28, 2024
@frapuks frapuks force-pushed the issue/5550-chunck1 branch 3 times, most recently from ef23535 to 44078c3 Compare May 31, 2024 08:56
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 67.49%. Comparing base (f97dbe0) to head (113b78c).
Report is 2 commits behind head on master.

Files Patch % Lines
...pencti-graphql/src/database/data-initialization.js 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7149      +/-   ##
==========================================
+ Coverage   67.45%   67.49%   +0.03%     
==========================================
  Files         561      561              
  Lines       69236    69255      +19     
  Branches     5867     5908      +41     
==========================================
+ Hits        46705    46741      +36     
+ Misses      22531    22514      -17     

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

@frapuks frapuks marked this pull request as ready for review June 3, 2024 12:04
@SarahBocognano
Copy link
Member

Question: When I check the capability to "access" data sharing but not the "manage" data sharing box I cannot access to the data sharing menu at all. Is it the attended behavior ?

@frapuks
Copy link
Member Author

frapuks commented Jun 4, 2024

Question: When I check the capability to "access" data sharing but not the "manage" data sharing box I cannot access to the data sharing menu at all. Is it the attended behavior ?

It's true, I naively thought that the existing state of the ‘data sharing’ section was correct. => fixed

@frapuks
Copy link
Member Author

frapuks commented Jun 7, 2024

It's ready for a 2nd round of review

@aHenryJard aHenryJard self-assigned this Jun 7, 2024
Copy link
Member

@SarahBocognano SarahBocognano left a comment

Choose a reason for hiding this comment

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

Retested ✅

@aHenryJard
Copy link
Member

Tested locally, I cannot import a csv file without having settings capa, but not sure if it's related to this PR or not.

Copy link
Member

@SouadHadjiat SouadHadjiat left a comment

Choose a reason for hiding this comment

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

please rename migration to update its timestamp before merge

@SouadHadjiat
Copy link
Member

SouadHadjiat commented Jun 13, 2024

When having "access ingestion" capabilility (without manage ingestion), I can see the edit buttons of CSV feeds and if I try to edit it redirects me to login page:

image

I also have the button + to create a new CSV ingestion but it also redirects me to login page. I guess it's because I'm trying to load CSV mappers list and it's protected by INGESTION_SETCSVMAPPERS capability

image

For RSS feeds and Taxii feeds, I only see the list, without any action

=> DONE

@frapuks frapuks force-pushed the issue/5550-chunck1 branch 2 times, most recently from d850a9a to 7bf7e33 Compare June 17, 2024 08:56
@frapuks frapuks force-pushed the issue/5550-chunck1 branch 2 times, most recently from 7927b1b to d86d713 Compare June 19, 2024 10:05
Copy link
Member

@SouadHadjiat SouadHadjiat left a comment

Choose a reason for hiding this comment

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

make sure before merging that the migration timestamp is up to date with master

@frapuks frapuks changed the title [Frontend/Backend] split cpapabilites Data Sharing & Ingestion into 2 + manage CSV + Bypass ref + Connector Api (#5550) [Frontend/Backend] split cpapabilites Data Sharing & Ingestion into 3 + manage CSV + Bypass ref + Connector Api (#5550) Jun 20, 2024
@frapuks frapuks changed the title [Frontend/Backend] split cpapabilites Data Sharing & Ingestion into 3 + manage CSV + Bypass ref + Connector Api (#5550) [Frontend/Backend] split cpapabilites Data Sharing & Ingestion into 3 + manage CSV + Bypass ref + Connector Api (#7428) Jun 20, 2024
@frapuks frapuks merged commit cddf50f into master Jun 20, 2024
5 checks passed
@frapuks frapuks deleted the issue/5550-chunck1 branch June 20, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split "data sharing and ingestion" capability into 3
4 participants