Skip to content

Conversation

@Convly
Copy link
Member

@Convly Convly commented Feb 26, 2021

This PR aims to rework some components of the admin permissions system (rbac) in order to fit better with the use of plugins and/or future modifications.

  • Replaces the permission.fields attribute by permission.properties + dedicated migration
  • Adds fields as a possible attribute of permission.properties
  • Rework the GET /permissions layout. Make it more generic.
  • Adapt the permissions engine to the new permission format, allow registering permissions handlers to modify the current payload (add a condition to the permission, update its properties, etc...)
  • Adds the capability to register callbacks whenever a new action is added to the action provider
  • Adds a domain object for the permission (rbac) to handle business-related operations
  • Register i18n rbac handlers
  • Rework the action (rbac) shape (removes fieldsRestriction, adds applyToProperties)
  • Update the validators for the admin APIs
  • Update the tests(integration + unit)

@Convly Convly force-pushed the i18n/permissions-engine-v2 branch from 7d34089 to 3029f0c Compare March 1, 2021 14:34
@soupette soupette mentioned this pull request Mar 2, 2021
@Convly Convly marked this pull request as ready for review March 4, 2021 16:13
@Convly Convly added the flag: don't merge This PR should not be merged at the moment label Mar 5, 2021
@petersg83 petersg83 self-requested a review March 8, 2021 08:50
@Convly Convly force-pushed the i18n/permissions-engine-v2 branch from ef92a94 to e0aef45 Compare March 8, 2021 10:44
Convly added 17 commits March 8, 2021 18:20
…the permissions

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
…tionRegistered events, adds i18n handlers

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
@Convly Convly requested a review from alexandrebodin March 22, 2021 08:51
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

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

Overwall way cleaner than what we had before 💯 . Really hard to ready all of this thouroughly though I will still need to review the tests

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

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

Will add one more round of testing on the feature branch

@alexandrebodin alexandrebodin merged commit 1e5b1c9 into features/i18n Mar 25, 2021
@Convly Convly removed the flag: don't merge This PR should not be merged at the moment label Mar 25, 2021
@alexandrebodin alexandrebodin deleted the i18n/permissions-engine-v2 branch March 25, 2021 13:59
@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/problems-with-upgrade-to-3-6-3/5408/6

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.

6 participants