# Bug OP-6548 - API v3 /relations/:id does not check permissions

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-6548

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 10.2.2 |
| Observed in versions |  |
| Sprint | 10.2.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| 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.  Untick &quot;Authorization required&quot;
2.  Using browser where no login information is present access /api/v3/relations/:id

### **Actual Behavior**

Regardless of whether the involved work packages are in public projects or not, the user is able to retrieve the relation including the involved work packages.

Even if the user is logged in and authorization is required, a user is able to retrieve relations for work packages he is not allowed to see and by that see the involved work packages.

### **Expected Behavior**

Only show relations that connect two work packages the requesting user is allowed to see. The `visible` scope will do that.
