Page MenuHomePhabricator

Auth - add "manage providers" capability
ClosedPublic

Authored by btrahan on Jan 12 2015, 10:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 3:12 PM
Unknown Object (File)
Thu, Dec 12, 8:48 AM
Unknown Object (File)
Sun, Dec 1, 5:56 AM
Unknown Object (File)
Nov 15 2024, 3:37 AM
Unknown Object (File)
Nov 11 2024, 7:26 AM
Unknown Object (File)
Oct 24 2024, 3:49 AM
Unknown Object (File)
Oct 24 2024, 1:57 AM
Unknown Object (File)
Oct 24 2024, 1:57 AM
Subscribers

Details

Summary

Ref T6947.

Test Plan

toggled setting in application settings and changes stuck. set policy to admin user a only and could not add a provider as a admin user b.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Auth - add "manage providers" capability.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.

One inline. We should also:

  • Check in PhabricatorAuthDisableController.
  • Maybe setDisabled(true) on the "Add Authentication Provider" link on the List view if you don't have the capability, so the button greys out. Likewise with the "disable" "X" on the list view.
  • After we default to "Admin", we could remove shouldRequireAdmin() from PhabricatorAuthProviderConfigController. I'm not 100% sure this has use cases -- it would let you create a more open policy around provider management -- but it's more consistent with how other policies work.
src/applications/auth/application/PhabricatorAuthApplication.php
149

This should default to PhabricatorPolicies::POLICY_ADMIN here.

This revision is now accepted and ready to land.Jan 12 2015, 10:19 PM
btrahan edited edge metadata.

changes as requested

This revision was automatically updated to reflect the committed changes.

The handleReqeust(AphrontRequest $request) cleanups are also really nice, I'm glad we made that change.

Yeah, the code definitely looks better this way... I figure I'll keep nibbling and eventually we can get more serious about conversion.