less-scope-exception-5
This commit is contained in:
parent
16c425fd5e
commit
005889c470
|
@ -70,6 +70,12 @@ async def get_shout(_, info, slug=None, shout_id=None):
|
||||||
|
|
||||||
if not shout.published_at:
|
if not shout.published_at:
|
||||||
user_id = info.context.get('user_id', '')
|
user_id = info.context.get('user_id', '')
|
||||||
|
if not user_id:
|
||||||
|
logger.warn('user is not logged in')
|
||||||
|
logger.debug(info)
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=401, detail='shout is not published yet'
|
||||||
|
)
|
||||||
roles = info.context.get('roles', [])
|
roles = info.context.get('roles', [])
|
||||||
logger.debug(f'{user_id} is getting shout which is not published yet')
|
logger.debug(f'{user_id} is getting shout which is not published yet')
|
||||||
logger.debug(f'roles: {roles}')
|
logger.debug(f'roles: {roles}')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user