-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add permission checks for admin to read and write in any `cod_SIAPE_i…
…nstituidora` (#104) * Add test for admin create pe in another unit * Checks that user is admin in test * Add test admin create status_participante in a unit other than their own * Solve linting warning singleton comparison * Add test for admin create pt in another unit * Use for tests user that is not actual admin and adjust the unit to a different unit * Fix organizational unit in test * Implement is_admin check in endpoint permissions * Solve linting warning * Solve linting warning * Format with black * Add fixtures to fix test * Add fixture for creating a pt in unit 3 * Adjust fixtures to recreate pe at every test * Add tests for creating a pt in different unit * Change user in test to not admin user * Implement permission check to read pt * Add docstrings to tests * Add tests for creating pe in different unit * Implement access control for reading plano_entrega * Add missing docstrings and make summaries uniform * Fix test to use a normal user and add example data * Add assert equal in get pe * Add helper functions for comparing status part * Compare status part content in test * Formatting and remove debug prints * Create example_part_unidade_3 fixture * Implement permission check in GET status_part * Replace fixture used in URL * Rename test * Add test add part in different unit as admin
- Loading branch information
1 parent
d8a9d57
commit d586819
Showing
6 changed files
with
390 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.