fulltext/routes.py
def inner(identifier: str, owner_id: Optional[str]) -> bool:
        """Check whether the session is authorized for a specific resource."""
        logger.debug('Authorize for %s owned by %s', identifier, owner_id)
        logger.debug('Client user id is %s', request.auth.user.user_id)
        try:
            source_id, checksum = identifier.split('/', 1)
        except ValueError as e:
            logger.debug('Bad identifier? %s', e)
            raise NotFound('Unsupported identifier') from e
        return (request.auth.is_authorized(scope, source_id)
                or (request.auth.user
                    and str(request.auth.user.user_id) == owner_id))
Check whether the session is authorized for a specific resource.
Check whether the session is authorized for a specific resource.
Check whether the session is authorized for a specific resource .
def inner(identifier: str, owner_id: Optional[str]) -> bool:
        logger.debug('Authorize for %s owned by %s', identifier, owner_id)
        logger.debug('Client user id is %s', request.auth.user.user_id)
        try:
            source_id, checksum = identifier.split('/', 1)
        except ValueError as e:
            logger.debug('Bad identifier? %s', e)
            raise NotFound('Unsupported identifier') from e
        return (request.auth.is_authorized(scope, source_id)
                or (request.auth.user
                    and str(request.auth.user.user_id) == owner_id))
def inner ( identifier : str , owner_id : Optional [ str ] ) -> bool : logger . debug ( 'Authorize for %s owned by %s' , identifier , owner_id ) logger . debug ( 'Client user id is %s' , request . auth . user . user_id ) try : source_id , checksum = identifier . split ( '/' , 1 ) except ValueError as e : logger . debug ( 'Bad identifier? %s' , e ) raise NotFound ( 'Unsupported identifier' ) from e return ( request . auth . is_authorized ( scope , source_id ) or ( request . auth . user and str ( request . auth . user . user_id ) == owner_id ) )
Check whether the session is authorized for a specific resource.
Check whether the session is authorized for a specific resource .
"""Check whether the session is authorized for a specific resource."""
identifier
str
owner_id
Optional[str]