Week 8
Goals for the week
Sl. No. | Initial Goals | Completed |
---|---|---|
1. | Solve requested changes on existing PRs | Done |
2. | Finish the implementation of REST API for modifying upload Permssions | Done |
REST API Implemented -
After designing the API in the previous weaek, the design was approved by Gaurav Sir and requested some final changes. So, following the API design I implemented the PUT /uploads/{id}/permissions
api for modifying the upload permissions via REST API.
uploadPermssions
:
- The API implementation of the
/uploads/{id}/permissions
PUT route to modify user Details is done. - This task included
- Creating a new PUT route in the
index.php
file insidewww/ui/api
directory. - Adding a new method
setUploadPermissions
in theUploadController
class. - Trying to re-use the methods that are already used in the
upload_permissions
plugin. - Testing the API via any API platform like postman.
- Creating a new PUT route in the
PR Link : feat(api): PUT api to Set permissions for a upload and GET API to fetch respective permissions of groups #2275
Testing /uploads/{id}/permissions
-
Pull the changes from the above PR.
-
Use any API platform like postman.
-
Provide the request body as following ----
-
You can expect a response like this
UI Implementation of the upload permissions page
When I started examining the UI behaviour of the upload permssions page, I realised that there is a requirement of an API that should return all the groups with their respective permissions for a given upload in order to create a tabular view in the UI.
Conclusions and further plans
- This PR is currently in review and if any changes are requested, I'll be solving them in the coming week.
- Implement and design the API that will return the groups with their respective permissions for a given upload ID.
- Implementing the react UI for the upload permissions page.