Follow the user permission attributes
Requires backend#1823 (closed), backend#1824 (closed)
-
The TypeScript definition of a
User
should be updated to include the five new boolean attributes. -
A new tab in the
/user/profile
view called Permissions shows each of the attributes, and whether or not they are enabled. This could use Bulma fields, with big read-only checkboxes, and<p class="help">
tag giving a longer description of what each permission is.- The ingest permission is hidden when the S3 feature flag is disabled.
-
The Import files from S3 button in the Actions menu should be visible, but disabled, when the S3 ingest feature flag is enabled but the user is neither an admin nor has
can_ingest
set. Thetitle
should explain that they are missing that permission. -
The
/process/buckets
view should show a warning notification and should not make an API request toListBuckets
(which will be unavailable) if the user is neither an admin nor hascan_ingest
set. The Import button should also always be disabled. When it is disabled, clicking it should never work (CSS won't be enough). -
The Create buttons on
/process/workers
and the Add worker versions modal of the process configuration page, both to create a worker and to create a worker version, should be disabled if the user is neither an admin nor hascan_create_worker_version
set. When those are disabled, clicking them should not open the modals, and atitle
should explain that the permission is required. -
The Archive worker button available in both
/process/workers
and/process/workers/:id
, as well as the✏ edit button in/process/workers/:id
, should be disabled if the user is neither an admin nor hascan_manage_workers
set. When those are disabled, clicking them should not open the modals, and atitle
should explain that the permission is required.