Skip to content

Commit

Permalink
moggie show mostly works now
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Sep 30, 2022
1 parent 95111c6 commit 48bbd69
Show file tree
Hide file tree
Showing 10 changed files with 311 additions and 51 deletions.
3 changes: 2 additions & 1 deletion moggie/app/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .admin import CommandGrant, CommandContext
from .admin import CommandUnlock, CommandEnableEncryption
from .admin import CommandImport, CommandExport
from .notmuch import CommandSearch, CommandAddress, CommandCount, CommandTag
from .notmuch import CommandSearch, CommandAddress, CommandShow, CommandCount, CommandTag
from .notmuch import CommandConfig
from .help import TOPICS

Expand Down Expand Up @@ -102,6 +102,7 @@ def _wrap(line, prefix=''):
CommandContext.NAME: CommandContext,
CommandAddress.NAME: CommandAddress,
CommandSearch.NAME: CommandSearch,
CommandShow.NAME: CommandShow,
CommandCount.NAME: CommandCount,
CommandTag.NAME: CommandTag,
CommandExport.NAME: CommandExport,
Expand Down
2 changes: 1 addition & 1 deletion moggie/app/cli/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ async def get_roles(self, want_context=True):
key=lambda i: -int(i[0]))
urls = []
if with_tokens and tokens:
urls.extend((tokens[0][0], '%s/%s' % (u, tokens[0][1]))
urls.extend((int(tokens[0][0]), '%s/%s' % (u, tokens[0][1]))
for u in cfg['config']['urls'])

if ctxs:
Expand Down
2 changes: 1 addition & 1 deletion moggie/app/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self, wd, args, access=None, appworker=None, connect=True):
self.messages = []
self.workdir = wd

if access is not True and not access:
if access is not True and not access and self.ROLES:
raise PermissionError('Access denied')
self.access = access
if self.ROLES and '--context=' not in self.options:
Expand Down
Loading

0 comments on commit 48bbd69

Please sign in to comment.