[extensions-web/filter-sort-ui: 3/20] Make sure extension authors agree to the terms of service



commit 517a2ff97c525ab19668117d928acccde4008f36
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 27 21:43:58 2011 -0500

    Make sure extension authors agree to the terms of service

 sweettooth/extensions/forms.py |    3 +++
 sweettooth/extensions/views.py |    5 +++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/forms.py b/sweettooth/extensions/forms.py
index c5fde42..7ed5809 100644
--- a/sweettooth/extensions/forms.py
+++ b/sweettooth/extensions/forms.py
@@ -6,3 +6,6 @@ class UploadForm(forms.Form):
     gplv2_compliant = forms.BooleanField(label="""
 I verify that my extension can be distributed under the terms of the GPLv2+
 """.strip())
+    tos_compliant = forms.BooleanField(label="""
+I agree that GNOME Shell Extensions can remove, modify or reassign maintainership of my extension
+""".strip())
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 2a0698c..7b095bd 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -357,6 +357,11 @@ def upload_file(request, pk):
                 messages.error(request, "You must be able to distribute your extension under the terms of the GPLv2+.")
                 return redirect_to_page()
 
+            tos_compliant = form.cleaned_data['tos_compliant']
+            if not tos_compliant:
+                messages.error(request, "You must agree to the GNOME Shell Extensions terms of service.")
+                return redirect_to_page()
+
             file_source = form.cleaned_data['source']
 
             try:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]