'method to add user_id to view_kwargs before post
:param args:
:param kwargs:
:param data:
:return:'

def before_post(self, args, kwargs, data):

    require_relationship(['event', 'user'], data)
    if (not has_access('is_coorganizer', event_id=data['event'])):
        event = safe_query(self, Event, 'id', data['event'], 'event_id')
        if (event.state == 'draft'):
            raise ObjectNotFound({'parameter': 'event_id'}, 'Event:    {}    not    found'.format(data['event_id']))
    if ('sessions' in data):
        session_ids = data['sessions']
        for session_id in session_ids:
            if (not has_access('is_session_self_submitted', session_id=session_id)):
                raise ObjectNotFound({'parameter': 'session_id'}, 'Session:    {}    not    found'.format(session_id))
