@view_config(route_name='<STR_LIT>', request_method='<STR_LIT:GET>',<EOL>accept='<STR_LIT:application/json>', renderer='<STR_LIT>', http_cache=<NUM_LIT:0>)<EOL>def get_accept_role(request):
publication_id = request.matchdict['<STR_LIT:id>']<EOL>user_id = request.matchdict['<STR_LIT>']<EOL>with db_connect() as db_conn:<EOL><INDENT>with db_conn.cursor() as cursor:<EOL><INDENT>cursor.execute("""<STR_LIT>""",<EOL>(publication_id, user_id))<EOL>user_documents = [r[<NUM_LIT:0>] for r in cursor.fetchall()]<EOL><DEDENT><DEDENT>return {'<STR_LIT>': publication_id,<EOL>'<STR_LIT>': user_id,<EOL>'<STR_LIT>': user_documents,<EOL>}<EOL>
This produces JSON data for a user (at ``uid``) to view the role(s)
    they have accepted or will need to accept for a publication (at ``id``).