pontoon/translations/views.py [203:221]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    locale = translation.locale

    # Read-only translations cannot be deleted
    if utils.readonly_exists(project, locale):
        return JsonResponse(
            {
                "status": False,
                "message": "Forbidden: This string is in read-only mode.",
            },
            status=403,
        )

    # Only privileged users or authors can delete translations
    if not translation.rejected or not (
        request.user.can_translate(locale, project) or request.user == translation.user
    ):
        return JsonResponse(
            {
                "status": False,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



pontoon/translations/views.py [482:500]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    locale = translation.locale

    # Read-only translations cannot be un-rejected
    if utils.readonly_exists(project, locale):
        return JsonResponse(
            {
                "status": False,
                "message": "Forbidden: This string is in read-only mode.",
            },
            status=403,
        )

    # Only privileged users or authors can un-reject translations
    if not translation.rejected or not (
        request.user.can_translate(locale, project) or request.user == translation.user
    ):
        return JsonResponse(
            {
                "status": False,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



