

def action_request(app_label, actor, request, rqdata, is_list, **kw):
    rpt = requested_actor(app_label, actor)
    action_name = rqdata.get(constants.URL_PARAM_ACTION_NAME, None)
    if (not action_name):
        if is_list:
            action_name = rpt.default_list_action_name
        else:
            action_name = rpt.default_elem_action_name
    a = rpt.get_url_action(action_name)
    if (a is None):
        raise http.Http404(('%s has no url action %r (possible values are %s)' % (rpt, action_name, rpt.get_url_action_names())))
    user = (request.subst_user or request.user)
    if True:
        if (not a.get_view_permission(user.profile)):
            raise exceptions.PermissionDenied(('As %s you have no permission to run this action.' % user.profile))
    ar = rpt.request(request=request, action=a, rqdata=rqdata, **kw)
    return ar

dataset/ETHPy150Open lsaffre/lino/lino/core/views.py action_request/original