# Bug BNE-113 - Inline work package links which the user can not access should have a speaking message

Project: Stream BlockNote extensions
Status: closed
URL: https://community.openproject.org/work_packages/BNE-113

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Modules and project features / Text editor / BlockNoteJS / OpenProject Extensions, Modules and project features / Documents |
| Target versions | 17.7.0 |
| Observed in versions |  |
| Sprint | Sprint 7 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Open a document which contains an inline link to a work package, which is not accessible for you

2.  See that you only see the work package identifier, but no indicator that you don't have permissions for more

### What is the buggy behavior?

It should be clear to the user that he's no seeing more details because he does not have permission on the work package

### What is the expected behavior?

We show a message "**Unavailable:** No permission" for HTTP Status error 404   
For failures of other reasons (e.g. error 500) we show: "**Unavailable:** error"

**Techical notes:** This check is already done in useWorkPackage.ts, you only need to adapt the inline work package implementation like the block implementation, which already checks for `workPackageResult.error` and `workPackageResult.unauthorized`

Since Wieland wanted it, we **also add an icon** with an crossed eye at the beginning: <https://primer.style/octicons/icon/eye-closed-16/> when the user does not have permission.

  - Right before the text

  - Also for the work package link card (icon before "Linked work package unavailable")

We add an exclamation mark icon for error ( <https://primer.style/octicons/icon/alert-16/> ) (also for inline and card links) at the same position.

### 

### Screenshots and other files

This is what it currently looks like for work package link cards when the user does not have permission:

*<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921976/content">*
