switching read_only mode #191

Merged
merged 1 commit into from Dec 5, 2013

Projects

None yet

3 participants

@zalun
zalun commented Dec 4, 2013

waffle switch "read_only" is needed to switch the site to read only mode

@zalun zalun switching read_only mode
waffle switch "read_only" is needed to switch the site to read only mode
00e20cf
@fwenzel fwenzel commented on the diff Dec 5, 2013
apps/jetpack/views.py
@@ -111,7 +112,7 @@ def view_or_edit(request, pk=None, id_number=None, type_id=None,
revision = get_package_revision(pk, id_number, type_id,
revision_number, version_name, latest)
- edit_available = True
+ edit_available = not waffle.switch_is_active('read_only')
fwenzel
fwenzel Dec 5, 2013 Member

why is it switch_is_active here and merely switch() in the template?

@fwenzel fwenzel commented on the diff Dec 5, 2013
apps/base/templates/_header.html
@@ -13,9 +14,12 @@ <h1 id="flightdeck-logo"><a title="Mozilla Labs &minus; Add-on Builder" href="{{
</ul>
</div>
</li>
+ {% endif %}
+ {# search is broken
fwenzel
fwenzel Dec 5, 2013 Member

Good you're commenting it out then!

@clouserw clouserw merged commit f25a60a into mozilla:master Dec 5, 2013
Owner
clouserw commented Dec 5, 2013

Merged this. will test on -dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment