Abbreviations, used in manual:
FW - Form Wizard
As part of the process of applying for updating Role's Project permissions, the user should follow these steps for each Project:
Note: each of mentioned API calls can be found in quilliup UI.
-
For specific Project (for example, for the Project with id = 8b6d734a-f319-4fd3-8a88-eace53593ba1) get Roles & Data Sources by implementing the next API:
- Method – GET
- Request URL - http://localhost:8080/api/projects/id/8b6d734a-f319-4fd3-8a88-eace53593ba1
-
Response:
{ "id": "8b6d734a-f319-4fd3-8a88-eace53593ba1", "name": "Itay_test", … "type": "projects", "assigned_datasources": [ { "type": "ORACLE", "moduleId": "3", "host": "xxxx", "port": "1521", "databaseName": "ORCL", "user": "admin", "password": "xxxx", "searchSubFolders": false, "isMigration": false, "id": "33174582-6322-4eaf-aa6a-88f3a5555a8d", "name": "Itay_DS_Oracle", "createdDate": "Oct 24, 2021 3:07:51 PM", "modifiedDate": "Oct 24, 2021 3:07:51 PM", "createdBy": "itay", "modifiedBy": "itay", "versionId": "29e829f3-e454-4b46-b066-0a9c09a7ba72", "enabledLogging": "false" }], "assigned_roles": [ { "description": "Test role for itay's test project", "moduleId": "3", "lastLogin": "Nov 3, 2021 4:59:30 PM", "permissions": { "data_sources": { "primary": true, "create": true, "edit": true, "delete": true, "assign_project_to_datasources": true }, "teams": { "primary": true, "create": true, "edit": true, "delete": true, "edit_team_and_assign_to_team": true }, "project": { "primary": true, "create": true, "edit": true, "delete": true, "assign_datasource_to_project": true, "assign_role_to_project": true, "allow_add_text_search": true }, "tags": { "primary": true, "create": true, "edit": true, "delete": true }, "functions": { "primary": true, "create": true, "edit": true, "delete": true }, "security": { "primary": true, "create_new_role": true, "edit_role_and_assign_to_role": true, "delete_role": true, "manage_project_role_permissions": true, "manage_default_project_permissions": true, "manage_global_permissions": true }, "deploy": { "project_related_objects": true, "datasources": true, "projects": true, "roles": true, "teams": true, "tags": true, "primary": true }, "import": { "primary": true}, "editor": { "primary": false}, "rdae": { "primary": false}, "loginConfPath": "C:\Program Files\quilliup\webapps\ROOT\WEB-INF\classes\login.conf", "isDefault": false }, "id": "b4b4aa3f-60fe-44d5-94d0-da33589e9e1a", "name": "Itay_t_r", "createdDate": "Oct 24, 2021 2:59:16 PM", "modifiedDate": "Nov 3, 2021 4:36:28 PM", "createdBy": "itay", "modifiedBy": "admin", "assigned_projects": [ { "id": "8b6d734a-f319-4fd3-8a88-eace53593ba1", "name": "Itay_test", "createdDate": "Oct 24, 2021 3:04:52 PM", "modifiedDate": "Nov 3, 2021 4:15:23 PM", "createdBy": "itay", "modifiedBy": "admin", "moduleId": "3", "lastCreatedObjectDate": "Nov 3, 2021 2:11:29 PM", "lastUpdatedObjectDate": "Nov 3, 2021 4:27:32 PM", "description": "", "testsView": "listView", "type": "projects" } ], } ], "groupTagName": "" }
- For each Role id (Role id's can be found in the array "assigned_roles", returned in response of previous API call, described in Step 1 - How to Deploy-Import by API) following API call should be implemented in order to receive current Role's Project permissions:
- Method – POST
- Request URL - http://localhost:8080/api/role_project_permissions/id
-
Body:
{ "projectId": "8b6d734a-f319-4fd3-8a88-eace53593ba1", "roleId": "b4b4aa3f-60fe-44d5-94d0-da33589e9e1a" } -
Response:
{ "id": "54be6d95-650f-48f9-b665-2970fd6b5b40", "projectId": "8b6d734a-f319-4fd3-8a88-eace53593ba1", "roleId": "b4b4aa3f-60fe-44d5-94d0-da33589e9e1a", "relId": "908176d7-9296-4e3b-82a0-d8a45461258c", … "assigned_datasources": [ { "type": "ORACLE", "moduleId": "3", … }, { "type": "MySQL", …} ], "permissions": { "formSecurity": { "28a2a1a7-89d0-43f2-b93c-b3a0592b7603": { "hidden_grid_columns": [], "where_filter": "", "view_only_columns": [], "hidden_form_columns": [], }, "9d558b98-fb4c-4c59-b65a-5a9aeb09d083": { "hidden_grid_columns": [], "where_filter": "product = 'RDA'", "view_only_columns": [], "hidden_form_columns": [], "allow_view": true, "allow_edit": true, "allow_add": true}}}}
- In order to update the “Where filter” field value for each FW Role's Project permissions:
- in Response, returned from API call under "permissions -> formSecurity"
- for object value for each id key (for example, "28a2a1a7-89d0-43f2-b93c-b3a0592b7603") make required changes
- use updated "permissions -> formSecurity" object as part of Body, required for the API call that will updated specific Role's Project permissions:
-
- Method – PUT
- Request URL - http://localhost:8080/api/role_project_permissions/id
-
Body:
{ "projectId": "8b6d734a-f319-4fd3-8a88-eace53593ba1", "roleId": "b4b4aa3f-60fe-44d5-94d0-da33589e9e1a" , "permissions": { "formSecurity": { "28a2a1a7-89d0-43f2-b93c-b3a0592b7603": { "hidden_grid_columns": [], "where_filter": "", "view_only_columns": [], "hidden_form_columns": [] }, "9d558b98-fb4c-4c59-b65a-5a9aeb09d083": { "hidden_grid_columns": [], "where_filter": "product = 'RDA'", "view_only_columns": [], "hidden_form_columns": [], "allow_view": true, "allow_edit": true, "allow_add": true } } } }
Comments
0 comments
Please sign in to leave a comment.