Page MenuHomePhabricator

Add a 'create' policy to Project
ClosedPublic

Authored by asherkin on Oct 9 2013, 11:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 9:03 AM
Unknown Object (File)
Thu, Dec 19, 7:01 PM
Unknown Object (File)
Wed, Dec 18, 5:49 AM
Unknown Object (File)
Mon, Dec 9, 7:10 AM
Unknown Object (File)
Mon, Dec 9, 4:12 AM
Unknown Object (File)
Mon, Dec 9, 4:11 AM
Unknown Object (File)
Fri, Dec 6, 6:14 PM
Unknown Object (File)
Thu, Dec 5, 3:26 PM

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.