Exemple #1
0
def deny_application(application_id, request_user=None, reason=""):
    get_chain_of_application_for_update(application_id)
    application = get_application(application_id)

    checkAllowed(application, request_user, admin_only=True)

    if not application.can_deny():
        m = _(astakos_messages.APPLICATION_CANNOT_DENY %
              (application.id, application.state_display()))
        raise PermissionDenied(m)

    qh_release_pending_app(application.owner)

    application.deny(reason)
    logger.info("%s has been denied with reason \"%s\"." %
                (application.log_display, reason))
    application_deny_notify(application)
Exemple #2
0
def deny_application(application_id, request_user=None, reason=""):
    get_project_of_application_for_update(application_id)
    application = get_application(application_id)

    app_check_allowed(application, request_user, level=ADMIN_LEVEL)

    if not application.can_deny():
        m = _(astakos_messages.APPLICATION_CANNOT_DENY %
              (application.id, application.state_display()))
        raise ProjectConflict(m)

    qh_release_pending_app(application.owner)

    application.deny(actor=request_user, reason=reason)
    logger.info("%s has been denied with reason \"%s\"." %
                (application.log_display, reason))
    application_deny_notify(application)
Exemple #3
0
def deny_application(application_id, request_user=None, reason=""):
    get_project_of_application_for_update(application_id)
    application = get_application(application_id)

    app_check_allowed(application, request_user, level=ADMIN_LEVEL)

    if not application.can_deny():
        m = _(astakos_messages.APPLICATION_CANNOT_DENY %
              (application.id, application.state_display()))
        raise ProjectConflict(m)

    qh_release_pending_app(application.owner)

    application.deny(actor=request_user, reason=reason)
    logger.info("%s has been denied with reason \"%s\"." %
                (application.log_display, reason))
    application_deny_notify(application)
Exemple #4
0
def deny_application(application_id, request_user=None, reason=""):
    get_chain_of_application_for_update(application_id)
    application = get_application(application_id)

    checkAllowed(application, request_user, admin_only=True)

    if not application.can_deny():
        m = _(astakos_messages.APPLICATION_CANNOT_DENY %
              (application.id, application.state_display()))
        raise PermissionDenied(m)

    qh_release_pending_app(application.owner)

    application.deny(reason)
    logger.info("%s has been denied with reason \"%s\"." %
                (application.log_display, reason))
    application_deny_notify(application)