-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration variable conf.supybot.capabilities.private.
This variable is a list of capabilities that are considered as 'private', ie. the bot won't tell anyone but admins that a user has it, nor will the bot give a list of users with this capability.
- Loading branch information
Showing
5 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
import supybot.ircdb as ircdb | ||
|
||
class UserTestCase(PluginTestCase): | ||
plugins = ('User', 'Admin') | ||
plugins = ('User', 'Admin', 'Config') | ||
prefix1 = '[email protected]' | ||
prefix2 = '[email protected]' | ||
def testHostmaskList(self): | ||
|
@@ -95,6 +95,14 @@ def testList(self): | |
self.assertRegexp('user list --capability testcap', 'no matching') | ||
self.assertNotError('admin capability add biff testcap') | ||
self.assertResponse('user list --capability testcap', 'biff') | ||
self.assertNotError('config capabilities.private testcap') | ||
self.assertRegexp('user list --capability testcap', 'Error:.*private') | ||
self.assertNotError('admin capability add biff admin') | ||
self.assertResponse('user list --capability testcap', 'biff') | ||
self.assertNotError('admin capability remove biff admin') | ||
self.assertRegexp('user list --capability testcap', 'Error:.*private') | ||
self.assertNotError('config capabilities.private ""') | ||
self.assertResponse('user list --capability testcap', 'biff') | ||
self.assertNotError('admin capability remove biff testcap') | ||
self.assertRegexp('user list --capability testcap', 'no matching') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters