Page MenuHomePhabricator

Add a 'create' policy to Project
ClosedPublic

Authored by asherkin on Oct 9 2013, 11:30 PM.
Tags
None
Referenced Files
F15479675: D7279.diff
Tue, Apr 8, 8:40 AM
F15474480: D7279.id16387.diff
Sun, Apr 6, 9:10 AM
F15397887: D7279.id.diff
Mar 16 2025, 10:48 PM
F15387918: D7279.id.diff
Mar 15 2025, 3:06 AM
F15387801: D7279.id16387.diff
Mar 15 2025, 2:56 AM
F15283179: D7279.diff
Mar 4 2025, 5:48 AM
Unknown Object (File)
Feb 27 2025, 3:12 AM
Unknown Object (File)
Feb 27 2025, 3:12 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP8cc64a96789b: Add a 'create' policy to Project
Summary

UX on this could probably be better 'disabled' crumbs don't appear to have any visible difference, and the policy error has to load the /create page rather than being a modal - not sure on the way to fix these.

Test Plan

Tried to create a project with and without access, saw suitable error.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Looks perfect to me, thanks! See inline for one weird trick to create dialogs. We'll make "disabled" look meaningfully different at some point, too.

{F66779}

src/applications/project/controller/PhabricatorProjectController.php
34–37

To get a dialog, do:

->setWorkflow(!$can_create)

This basically means "Use JX.Workflow (which does dialogs) to follow this link if the user doesn't have create permission".

I'll add this in the pull.