# Bug COSTS-60 - When allowed to log time entries for others, time entries can be logged for any user regardless of visibility

Project: Stream Time & Costs
Status: closed
URL: https://community.openproject.org/work_packages/COSTS-60

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.3.0 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Klaus Zanders |
| 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

Use the OpenProject API and log time for a user that is not a member of the project or that the logging user cannot see.

Alternatively you can also do this in the browser by manually setting the `user_id` field in the time entry form to an ID you should not have access to (i.e. using developer tools in the browser)

### What is the buggy behavior?

The time entry is happily logged

### What is the expected behavior?

You get an error that states that the user is invalid, same as if you would log time for a work package that does not exist
