debug-2
This commit is contained in:
parent
026bad95e2
commit
f1bda441b4
|
@ -42,11 +42,11 @@ async def get_my_shout(_, info, shout_id: int):
|
|||
|
||||
logger.debug('got shout')
|
||||
is_editor = "editor" in roles
|
||||
logger.debug('viewer is editor')
|
||||
logger.debug(f'viewer is{'' if is_editor else ' not'} editor')
|
||||
is_creator = author_id == shout.created_by
|
||||
logger.debug('viewer is creator')
|
||||
logger.debug(f'viewer is{'' if is_creator else ' not'} creator')
|
||||
is_author = filter(lambda x: x.id == int(author_id), [x for x in shout.authors])
|
||||
logger.debug('viewer is author')
|
||||
logger.debug(f'viewer is{'' if is_creator else ' not'} author')
|
||||
can_edit = is_editor or is_author or is_creator
|
||||
|
||||
if not can_edit:
|
||||
|
|
Loading…
Reference in New Issue
Block a user