Page MenuHomePhabricator

Naunce - capalities for Source object
ClosedPublic

Authored by btrahan on Nov 8 2013, 8:14 PM.
Tags
None
Referenced Files
F14036539: D7535.diff
Sun, Nov 10, 10:41 AM
F14012220: D7535.diff
Fri, Nov 1, 9:08 AM
F13984041: D7535.diff
Sun, Oct 20, 10:34 AM
F13981675: D7535.id16997.diff
Sat, Oct 19, 6:22 PM
F13976734: D7535.diff
Fri, Oct 18, 3:27 PM
Unknown Object (File)
Oct 8 2024, 6:58 AM
Unknown Object (File)
Oct 3 2024, 8:32 PM
Unknown Object (File)
Oct 3 2024, 8:27 PM

Details

Reviewers
epriestley
Commits
Restricted Diffusion Commit
rP3de4e91dacbf: Naunce - capalities for Source object
Summary

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.

Test Plan

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?

btrahan updated this revision to Unknown Object (????).Nov 8 2013, 8:38 PM

updates as suggested

btrahan updated this revision to Unknown Object (????).Nov 8 2013, 8:41 PM

missed one s/edit/manage/g

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.