kobotoolbox / kpi

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.
https://www.kobotoolbox.org
GNU Affero General Public License v3.0
131 stars 177 forks source link

[TASK-814] [TASK-815] [TASK-816] Make sharing modal accessible from project view list #4977

Closed jamesrkiger closed 3 months ago

jamesrkiger commented 3 months ago

Checklist

  1. [ ] If you've added code that should be tested, add tests
  2. [ ] If you've changed APIs, update (or create!) the documentation
  3. [x] Ensure the tests pass
  4. [x] Make sure that your code lints and that you've followed our coding style
  5. [x] Write a title and, if necessary, a description of your work suitable for publishing in our release notes
  6. [ ] Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
  7. [ ] 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.

notion-workspace[bot] commented 3 months ago

MVP - Make sharing modal accessible from project view list

notion-workspace[bot] commented 3 months ago

Expand list of permissions returned on asset for project view users

notion-workspace[bot] commented 3 months ago

MVP + 1: Disable superfluous UI