Page MenuHomePhabricator

Fix isReadable() and isWritable() in SearchService
ClosedPublic

Authored by epriestley on Mar 28 2017, 7:51 PM.
Tags
None
Referenced Files
F15580954: D17571.id42274.diff
Wed, May 7, 8:52 AM
F15566081: D17571.id42274.diff
Thu, May 1, 12:20 PM
F15558221: D17571.id42274.diff
Tue, Apr 29, 1:39 AM
F15534951: D17571.id42281.diff
Thu, Apr 24, 2:47 AM
F15534659: D17571.diff
Thu, Apr 24, 1:11 AM
F15521767: D17571.diff
Sun, Apr 20, 3:46 PM
F15521305: D17571.id42281.diff
Sun, Apr 20, 12:59 PM
F15512829: D17571.id.diff
Thu, Apr 17, 2:16 PM
Subscribers
None

Details

Summary

Ref T12450. Minor cleanup:

  • setRoles() has no callers.
  • getRoles() has no callers (these two methods are leftovers from an earlier iteration of the change).
  • The hasRole() logic doesn't work since nothing calls setRole().
  • hasRole() has only isreadable/iswritable as callers.
  • The isReadable()/isWritable() logic doesn't work since hasRole() doesn't work.

Instead, just check if there are any readable/writable hosts. Host already inherits its config from Service so this gets the same answer without any fuss.

Also add some read/write constants to make grepping this stuff a little easier.

Test Plan
  • Grepped for all removed symbols, saw only newer-generation calls in Host.
  • See next diff for use of isWritable().

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable