Page MenuHomePhabricator

Unable to edit calendar events created by someone else, even after `bin/policy unlock`
Closed, ResolvedPublic

Description

Steps taken:

  1. The account of a prior staff member was disabled as part of off-boarding
  2. This staff member hosted calendar events in Phabricator
  3. Now we attempt to cancel and/or edit one of the events
    • fails due to edit policy set to host
  4. I ran bin/policy unlock to reset object policies
  5. Attempt to edit the event again
    • still fails with the following:
You do not have permission to edit this object.
Users with the "Can Edit" capability:

    RobLa-WMF can take this action.
    The host of an event can always view and edit it.

So apparently unlocking policies doesn't quite work the same way with calendar events? I suspect it has something to do with calendar events using hostPHID instead of authorPHID but I may be wrong.

Event Timeline

Hmm, I'm having trouble reproducing this. Here's what I did:

  • As @dog, created an event and set "Edit Policy: Event Host".
  • As @hector, tried to edit the event. I got a policy exception, as I would expect:

Screen Shot 2016-12-05 at 9.06.15 AM.png (1×1 px, 178 KB)

  • I ran bin/policy unlock E275:
$ ./bin/policy unlock E275
Unlocking: E275: Host Edit Only
Unlocked view policy.
Unlocked edit policy.
  • As @hector, I tried to edit the event again. This time, it worked:

Screen Shot 2016-12-05 at 9.06.31 AM.png (1×1 px, 135 KB)

I can also currently edit the linked downstream task as @epriestley on the WMF install, so it seems like it got unlocked somehow?

epriestley claimed this task.

I wasn't able to reproduce this earlier so I'm not sure how to move forward, but feel free to follow up if you have more information.