kpi is the (frontend) server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
[ ] If you've added code that should be tested, add tests
[ ] If you've changed APIs, update (or create!) the documentation
[x] Ensure the tests pass
[x] Make sure that your code lints and that you've followed our coding style
[x] Write a title and, if necessary, a description of your work suitable for publishing in our release notes
[ ] Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
[ ] Open an issue in the docs if there are UI/UX changes
Description
The primary goal of this PR is to enable users to access asset sharing details for assets they can only see via a Project View. This is done without respect to asset permissions. If a user is viewing a list of projects through the Project View, they will be able to use the quick links at the top of the table to see sharing details for any project in that view. This will be the only way for them to access these sharing details for the time being (that is, they will not be able to access the sharing details from within the form detail view).
Secondarily, this PR disables/hides controls in the sharing form based on the user's permissions for that asset. This impacts both Project View users and other users on shared projects without manage_asset permissions, and should be a UI improvement for the latter since we were previously allowing them to click the controls and get rejected by the backend.
Checklist
Description
The primary goal of this PR is to enable users to access asset sharing details for assets they can only see via a Project View. This is done without respect to asset permissions. If a user is viewing a list of projects through the Project View, they will be able to use the quick links at the top of the table to see sharing details for any project in that view. This will be the only way for them to access these sharing details for the time being (that is, they will not be able to access the sharing details from within the form detail view).
Secondarily, this PR disables/hides controls in the sharing form based on the user's permissions for that asset. This impacts both Project View users and other users on shared projects without
manage_asset
permissions, and should be a UI improvement for the latter since we were previously allowing them to click the controls and get rejected by the backend.