Fixes T11595. Previously if a user didn't have permissions to view an application it would still appear in the application typeahead in various menus. This change will prevent that by checking if the app is installed for the viewer before displaying it as an option
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T11595: PhabricatorApplicationDatasource returns applications which have been uninstalled (e.g., in "Pin Application")
- Commits
- rP0030bda17ea3: Check if app is installed for user before displying
I went to the "Pin Applications" menu and typed in "Conpherence" and saw it appear as an option. I then went to the "Edit Policies" menu as an admin and removed permissions for my user to use Conpherence. Once I did that, it no longer showed up in the typeahead menu
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/applications/meta/typeahead/PhabricatorApplicationDatasource.php | ||
---|---|---|
30–33 | For consistency, consider formatting this like this, with one parameter per line and more-verbose but simpler structure: $is_installed = X::Y( $x, $y); if (!$is_installed) { continue; } Wrapping to one parameter per line makes it harder to miss things like ..., true) hiding in the end of a nested line (I think ..., true) is usually a bad API, but we have some of them). |