Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rbac): split policies and roles by source (#1042)
* fix(rbac): split policies by source Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): imporove code Rename location to source Add grouping validation for policy file. Don't allow to modify roles and permission policy from permission policy file. Fix some bugs. Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): add transactions for role and policies metadata Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): cleanup policies which gone from csv policies file Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): handle preexisting policies by adding a legacy source * fix(rbac): add unit tests for role-metadata.ts Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fix rest api unit tests Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fmt code Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fix failing tests Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): update knex-mock-client to align with knex 3.0 from main Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): avoid nested transactions for sqlite3 Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): handle code review feedback. Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): handle code review feedback Move predefined policies validation from permission-policy.ts file to policies-validation.ts. Add validation for admin users defined in the application config file. Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): improve clean up csv file policies and add tests around that Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): handle code review feedback about has method for Set Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): don't allow to modify configuration permission policies Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): add more unit tests Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): add the ability to update legacy policies * fix(rbac): fix validation mistake Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): complete fix bug #1103 Complete fix bug, when after removing admin from app configuration, admin still present. Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fix compilation and tests after rebase Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fix legacy migration for admin group policies Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fix sonarcloud issues * fix(rbac): fix migration issue with multiple admins * fix(rbac): remove console log * fix(rbac): fix bug with hanging transaction on sqlite3 Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * fix(rbac): fix tests after rebase Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> --------- Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Patrick Knight <pknight@redhat.com>
- Loading branch information