Skip to content

Better indication when a user lacks access to data via a direct link #680

Description

@muhanadz

Currently, when a user clicks a direct link to an OMERO object (project, dataset, image, etc.) that they do not have access to (or that does not exist), OMERO.web silently redirects them to their last group context.
For example:

  1. A user is actively working in an OMERO group/project they can access (e.g., Group X).
  2. Another user sends them a direct link to a project they do not have access to, e.g.: https://[server-url]/webclient/?show=project-Y
  3. Instead of showing an "access denied" message, a "not found" page, or otherwise indicating that the target is unavailable, OMERO.web opens the user’s most recently viewed group/context (Group X).

This makes it appear as though the shared link has opened successfully, but it actually displays unrelated content from the user's last session context. We received feedback that this causes confusion for users who are expecting to see specific shared data, as there is no clear indication that they can't view it.

I'd propose that when a user opens a direct link to an OMERO object that is unavailable or restricted, OMERO.web should explicitly indicate the lack of access.

As a simple Proof of Concept, this could be handled by returning an error page using handlerInternalError(request, DIRECT_LINK_NOT_FOUND_MESSAGE) around views.py#L464. It might also be useful to add a logging statement in show.py#L369.

Few things to note:

  • We discussed whether replacing the silent redirect with an error page might break existing workflows. However, because the redirect destination is entirely unpredictable (it depends on the user's session history and last active group), it is highly unlikely that any valid automated workflow relies on this behaviour.
  • An alternative to a full error page is to maintain the redirect behaviour but display a dismissible warning/toast notification (e.g., "The requested project could not be found or you do not have permission to view it"). However, as noted in ome/omero-web#673, the core application currently lacks a unified capability for showing such user notifications.

Given the unlikelihood of workflows depending on the silent redirect, we propose intercepting these requests and redirecting to a generic error/warning page to improve the user experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions