Skip to content

[Bug] Show a Clear Permission Error When a Read-Only User Attempts to Create or Edit Samples and Measurements #1407

Description

@Steffengreiner

Context
Users with read-only permissions are currently able to open up a dialogue to provide information when they attempt the following processes:

1.) Register Samples
2.) Edit Samples
3.) Register genomic and proteomic measurements
4.) Edit genomic and proteomic Measurements

Their Permissions are only checked when they trigger the above mentioned processes and inconsistent states appear within the system.
A precedent for better handling already exists in the experiment design update flow and the sample and measurement deletion flows, which show a notification "insufficient permission" pop-up with a clear call to action (asking the project owner for edit permissions), before the user wastes time providing non-registerable input

Current Behaviour

Sample:
When a read-only user triggers the register sample process AFTER filling in all information in the registration dialogue they see the following:

  • A small toast notification stating that the sample registration in process
  • a Notification "insufficient permission" pop-up with a clear call to action (asking the project owner for edit permissions)
Image

When a read-only user triggers the edit samples process AFTERfilling in all the information in the edit dialogue they see the following:

  • An unspecific toast notification specifying that the triggered process failed
Image

Measurement:

When a read-only user attempts to register or edit measurements the respective dialogues are stuck during the "Starting Validation" process:

**Register Measurement:

Image Image

**Edit Measurement:
Image
Image

Expected Behaviour

When a read-only user attempts to create and edit samples or measurements, they are shown a clear, prominent message explaining that they have insufficient permissions to perform the action. The specifically means that the dialogue for editing and registration does not appear for read-only users

Acceptance Criteria

  • Given a user with read-only permissions attempts to create a sample batch, when the action is triggered, then a clear permission error message is shown with a call to action (e.g. directing the user to contact a project admin).
  • Given a user with read-only permissions attempts to edit a sample batch, when the action is triggered, then a clear permission error message is shown with a call to action (e.g. directing the user to contact a project admin).
  • Given a user with read-only permissions attempts to create or edit a measurement, when the action is triggered, then a clear permission error message is shown with a call to action (e.g. directing the user to contact a project admin).
  • Given a user with at least edit permissions perform the previously noted actions, when the action is triggered, then the registration and editing processes are performed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Todo
    Status
    Approve

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions