Skip to main content

Week 8

Goals for the week

Sl. No.Initial GoalsCompleted
1.Solve requested changes on existing PRsDone
2.Finish the implementation of REST API for modifying upload PermssionsDone

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 inside www/ui/api directory.
    • Adding a new method setUploadPermissions in the UploadControllerclass.
    • Trying to re-use the methods that are already used in the upload_permissions plugin.
    • Testing the API via any API platform like postman.

Testing /uploads/{id}/permissions

  • Pull the changes from the above PR.

  • Use any API platform like postman.

  • Provide the request body as following ---- req-body-upload-permissions

  • You can expect a response like this res-upload-permissions

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.