adfinis / timed

Monorepo for the Timed time-tracking application
GNU Affero General Public License v3.0
4 stars 5 forks source link

[BUG]: You do not have permission to perform this action when stopping an activity #233

Open hairmare opened 1 month ago

hairmare commented 1 month ago

Description

I'm unable to stop an activity that i started earlier today.

Steps to Reproduce

  1. start activity
  2. wait some time, maybe until the next day
  3. generate worksheet or have the frontend set transferred=True in another way without setting end time
  4. be stuck with an activity that is transferred and therefore can't be edited via the API, that has no to_time and is therefore running, which makes it so no new ones can be started

Expected Behavior

It stops the activity

Attachments

I see the following error in the response to a PATCH req to https://timed.adfinis.com/api/v1/activities/214087

{
  "errors": [
    {
      "detail": "You do not have permission to perform this action.",
      "status": "403",
      "source": {
        "pointer": "/data"
      },
      "code": "permission_denied"
    }
  ]
}

Additional Context

I generated HAR if need be.

It's not logging much on the backend:

Forbidden: /api/v1/activities/214087
403 PATCH /api/v1/activities/214087 (10.100.18.71) 204.12ms

Version

5.1.9

Required

hairmare commented 1 month ago

This activity was started before the update to 4.1.9 and i wanted to stop it after the update. Not sure if relevant, but if that was the only issue then we can safely close this issue if it's not something that happens with every update.

hairmare commented 1 month ago

I tested this during the 4.1.10 update by starting an activity before the rollout and stopping it afterwards and i wasn't able to reproduce this anymore.

Most likely there was DB change in the last migration that had this impact and this isn't a symptom of each release.

I'm closing this since it doesn't seem actionable anymore now.

c0rydoras commented 4 weeks ago

This happens nearly every deployment and is starting to annoy me