Page MenuHomePhabricator

Don't require edit capability on the Favorites application to edit personal menu items
ClosedPublic

Authored by epriestley on Jan 19 2017, 7:11 PM.

Details

Summary

Ref T11096. Currently, editing ProfileMenuItemConfigurations always requires that you can edit the corresponding object.

This is correct for global items (for example: you can't change the global menu for a project unless you can edit the project) but not for personal items.

For personal items, only require that the user can edit the customPHID object. Today, this is always their own profile.

Test Plan

As a non-admin, edited personal menu items.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jan 19 2017, 7:11 PM
chad edited edge metadata.Jan 19 2017, 7:12 PM

How should we have caught this? Non-admin testing?

chad accepted this revision.Jan 19 2017, 7:13 PM
This revision is now accepted and ready to land.Jan 19 2017, 7:13 PM

Yeah, non-admins editing their own items.

(I tested a bit as as a non-admin but didn't try to customize the menu, and customized the menu only as an admin.)

This revision was automatically updated to reflect the committed changes.

Is there any way that getCustomPHID would return false/null when it's a non-admin editing favorites?

I got this report, which seems like the same issue: https://phabricator.wikimedia.org/T156360

chad added a comment.Jan 27 2017, 2:13 AM

Haven't seen other reports, not sure how to reproduce that.

chad added a comment.Jan 27 2017, 2:17 AM

AH ok I can reproduce, will file something