remove "accept-webapps" waffle flag and "use_apps" AMO decorator

This commit is contained in:
Chris Van 2014-01-03 10:42:50 -08:00
Родитель 69b16c83bf
Коммит 109a8160ec
4 изменённых файлов: 11 добавлений и 26 удалений

Просмотреть файл

@ -177,9 +177,6 @@ class AppsHandler(AddonsHandler):
@transaction.commit_on_success
def create(self, request):
if not waffle.flag_is_active(request, 'accept-webapps'):
return rc.BAD_REQUEST
form = NewManifestForm(request.POST)
if form.is_valid():
# This feels like an awful lot of work.

Просмотреть файл

@ -3,8 +3,6 @@ import functools
from django import http
from django.core.exceptions import PermissionDenied
import waffle
from amo.decorators import login_required
from access import acl
from addons.decorators import addon_view
@ -57,13 +55,3 @@ def dev_required(owner_for_post=False, allow_editors=False, webapp=False,
return decorator(f)
else:
return decorator
# Mark a view as a web app
def use_apps(f):
def wrapper(request, *args, **kwargs):
# This should be set to True when the waffle
# flag is removed!
show_webapp = waffle.flag_is_active(request, 'accept-webapps')
return f(request, *args, webapp=show_webapp, **kwargs)
return wrapper

Просмотреть файл

@ -3,10 +3,10 @@ from django.shortcuts import redirect
from lib.misc.urlconf_decorator import decorate
from addons.urls import ADDON_ID
import amo
from addons.urls import ADDON_ID
from amo.decorators import write
from devhub.decorators import use_apps
from . import views
PACKAGE_NAME = '(?P<package_name>[_\w]+)'
@ -24,10 +24,10 @@ submit_patterns = patterns('',
)
submit_apps_patterns = patterns('',
url('^3$', use_apps(views.submit_describe), name='devhub.submit_apps.3'),
url('^4$', use_apps(views.submit_media), name='devhub.submit_apps.4'),
url('^5$', use_apps(views.submit_done), name='devhub.submit_apps.5'),
url('^bump$', use_apps(views.submit_bump), name='devhub.submit_apps.bump'),
url('^3$', views.submit_describe, name='devhub.submit_apps.3'),
url('^4$', views.submit_media, name='devhub.submit_apps.4'),
url('^5$', views.submit_done, name='devhub.submit_apps.5'),
url('^bump$', views.submit_bump, name='devhub.submit_apps.bump'),
)
@ -183,10 +183,8 @@ urlpatterns = decorate(write, patterns('',
# Web App submission
url('^app/submit/$',
lambda r: redirect('devhub.submit_apps.1', permanent=True)),
url('^app/submit/1$', use_apps(views.submit),
name='devhub.submit_apps.1'),
url('^app/submit/2$', use_apps(views.submit_addon),
name='devhub.submit_apps.2'),
url('^app/submit/1$', views.submit, name='devhub.submit_apps.1'),
url('^app/submit/2$', views.submit_addon, name='devhub.submit_apps.2'),
# Standalone validator:
url('^addon/validate/?$', views.validate_addon,
@ -207,7 +205,7 @@ urlpatterns = decorate(write, patterns('',
url('^addons$', views.dashboard, name='devhub.addons'),
url('^themes$', views.dashboard, name='devhub.themes',
kwargs={'theme': True}),
url('^apps$', use_apps(views.dashboard), name='devhub.apps'),
url('^apps$', views.dashboard, name='devhub.apps'),
url('^feed$', views.feed, name='devhub.feed_all'),
# TODO: not necessary when devhub homepage is moved out of remora
url('^feed/all$', lambda r: redirect('devhub.feed_all', permanent=True)),

Просмотреть файл

@ -0,0 +1,2 @@
DELETE FROM waffle_flag_amo WHERE name = 'accept-webapps';
DELETE FROM waffle_flag_mkt WHERE name = 'accept-webapps';