Content
View differences
Updated by Judith Roth 7 days ago
### 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" permission missing" 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/](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/](https://primer.style/octicons/icon/alert-16/) ) (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">_
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 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/](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/](https://primer.style/octicons/icon/alert-16/) )
###
### 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">_