another little piece here that basically just adds some permissions to source editing. serving it up before I do anything too complicated to make sure it seems kosher. in terms of what comes next this form needs to be dynamic based on source type so there'll be some fun there. That said, I plan to implement a more simple "phabricator form" only version to start here and flesh out a few other things like queues with that.
Details
- Reviewers
epriestley - Commits
- Restricted Diffusion Commit
rP3de4e91dacbf: Naunce - capalities for Source object
set permission to no one for source edit and got a nice error page.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Minor inlines.
src/applications/nuance/capability/NuanceCapabilitySourceEdit.php | ||
---|---|---|
3 ↗ | (On Diff #16996) | Maybe call this "Create" or "Manage" to distinguish from the individual source edit permission. |
src/applications/nuance/constants/NuanceSourceType.php | ||
6–13 | We should plan for these to eventually be decentralized/pluggable/definable by third parties, but this seems fine for now. Maybe leave "0" undefined so "uninitialized" vs "internal" is clearly an error. | |
19 | pht() | |
src/applications/nuance/controller/NuanceSourceEditController.php | ||
103–104 | We should dump this into a PHUIObjectBoxView at some point. |
src/applications/nuance/constants/NuanceSourceType.php | ||
---|---|---|
6–13 | In the existing codebase, what do you think is the best model for this decentralization? |
I think the PHIDType and Capabilities stuff are both good examples, although they're more complex than this. Basically define some abstract base class and then figure out all the avialable "stuff" by using PhutilSymbolLoader.