You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2019/09/03 17:17:10 UTC

[allura] branch db/8331 created (now 72ab8c5)

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a change to branch db/8331
in repository https://gitbox.apache.org/repos/asf/allura.git.


      at 72ab8c5  [#8331] remove export control settings

This branch includes the following new commits:

     new 72ab8c5  [#8331] remove export control settings

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[allura] 01/01: [#8331] remove export control settings

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8331
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 72ab8c52d034bc3ba07b9a160ae6a50ca08aff14
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Sep 3 13:17:05 2019 -0400

    [#8331] remove export control settings
---
 Allura/allura/ext/admin/admin_main.py              | 34 ++--------------------
 .../templates/admin_widgets/metadata_admin.html    | 24 ---------------
 .../ext/admin/templates/project_overview.html      | 26 -----------------
 Allura/allura/ext/admin/widgets.py                 |  5 ----
 Allura/allura/model/project.py                     |  2 --
 .../templates/admin_widgets/metadata_admin.html    | 25 ----------------
 Allura/allura/tests/functional/test_admin.py       | 16 ----------
 Allura/development.ini                             |  3 --
 8 files changed, 2 insertions(+), 133 deletions(-)

diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 2319a24..d6c4f16 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -59,8 +59,6 @@ log = logging.getLogger(__name__)
 class W:
     markdown_editor = ffw.MarkdownEdit()
     label_edit = ffw.LabelEdit()
-    explain_export_modal = ffw.Lightbox(
-        name='explain_export', trigger='#why_export')
     group_card = aw.GroupCard()
     permission_card = aw.PermissionCard()
     group_settings = aw.GroupSettings()
@@ -229,22 +227,10 @@ class ProjectAdminController(BaseController):
         metadata_admin_value = h.fixed_attrs_proxy(
             c.project,
             features=[{'feature': f} for f in c.project.features])
-        c.explain_export_modal = W.explain_export_modal
-        show_export_control = asbool(config.get('show_export_control', False))
         allow_project_delete = asbool(config.get('allow_project_delete', True))
-        explain_export_text = '''The purpose of this section is to determine whether your project is subject to the
-         provisions of the US Export Administration Regulations. You should consult section 734.4 and Supplement 2
-          to Part 734 for information on such items and the calculation of U.S. controlled content.
-          <a href="https://www.bis.doc.gov/policy-guidance/encryption" target="_blank">
-          https://www.bis.doc.gov/policy-guidance/encryption</a>'''
-        if 'us_export_contact' in config:
-            explain_export_text += \
-                'If you have additional questions, ' \
-                'please contact <a href="mailto:{contact}">{contact}</a>.'.format(contact=config['us_export_contact'])
-        return dict(show_export_control=show_export_control,
-                    allow_project_delete=allow_project_delete,
+        return dict(allow_project_delete=allow_project_delete,
                     metadata_admin_value=metadata_admin_value,
-                    explain_export_text=explain_export_text)
+                    )
 
     @without_trailing_slash
     @expose('jinja:allura.ext.admin:templates/project_screenshots.html')
@@ -338,8 +324,6 @@ class ProjectAdminController(BaseController):
                facebook_page='',
                removal='',
                moved_to_url='',
-               export_controlled=False,
-               export_control_type=None,
                tracking_id='',
                features=None,
                **kw):
@@ -424,20 +408,6 @@ class ProjectAdminController(BaseController):
             h.log_action(log, 'change project moved to url').info('')
             M.AuditLog.log('change project moved to url to %s', moved_to_url)
             c.project.moved_to_url = moved_to_url
-        export_controlled = asbool(export_controlled)
-        if export_controlled != c.project.export_controlled:
-            h.log_action(
-                log, 'change project export controlled status').info('')
-            M.AuditLog.log(
-                'change project export controlled status to %s', export_controlled)
-            c.project.export_controlled = export_controlled
-            if not export_controlled:
-                export_control_type = None
-        if export_control_type != c.project.export_control_type:
-            h.log_action(log, 'change project export control type').info('')
-            M.AuditLog.log('change project export control type to %s',
-                           export_control_type)
-            c.project.export_control_type = export_control_type
         if tracking_id != c.project.tracking_id:
             h.log_action(log, 'change project tracking ID').info('')
             M.AuditLog.log('change project tracking ID to %s', tracking_id)
diff --git a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
index fd46a4a..24f2898 100644
--- a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
+++ b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
@@ -159,30 +159,6 @@
         </div>
     </div>
     {% endif%}
-    {% if show_export_control %}
-    <div id="export_control">
-      <div style="clear:both">&nbsp;</div>
-      <label for="export_controlled">Export Control: <small><a href="#" id="why_export">Why?</a></small></label>
-      <br>
-      <input id="export_controlled" name="export_controlled" type="checkbox" value="True"
-             {% if value.export_controlled == True %} checked{% endif %}> This project incorporates, accesses, calls upon or otherwise uses encryption software with a symmetric key length greater than 64 bits ("encryption"). This review does not include products that use encryption for authentication only.<br>
-      <div id="export_details" style="margin-left: 1em;{% if value.export_controlled == False %} display:none;{% endif %}">
-        <label>
-          <input name="export_control_type" type="radio" value="less_than_10"
-               {% if value.export_control_type == "less_than_10" %} checked{% endif %}> This Project has less than 10% U.S.-origin parts or components.<br>
-        </label>
-        <label>
-          <input name="export_control_type" type="radio" value="less_than_25"
-               {% if value.export_control_type == "less_than_25" %} checked{% endif %}> This Project has more than 10% but less than 25% U.S.-origin parts or components.<br>
-        </label>
-        <label>
-          <input id="export_restricted" name="export_control_type" type="radio" value="more_than_25"
-               {% if value.export_control_type == "more_than_25" %} checked{% endif %}> This Project has more than 25% U.S-origin parts or components.<br>
-        </label>
-      </div>
-      <div id="export_warning" class="notice"{% if value.export_controlled == False or value.export_control_type == "less_than_10" or value.export_control_type == "less_than_25" %} style="display:none"{% endif %}>You must notify BIS and the ENC Encryption Request Coordinator via e-mail of the Internet location (e.g., URL or Internet address) of the publicly available encryption source code or provide each of them a copy of the publicly available encryption source code. If you update or m [...]
-    </div>
-    {% endif %}
   </div>
   <hr class="grid-19" style="margin-top: 1em; margin-bottom: 1em;">
   <div class="grid-15">
diff --git a/Allura/allura/ext/admin/templates/project_overview.html b/Allura/allura/ext/admin/templates/project_overview.html
index 4f81d66..d47744e 100644
--- a/Allura/allura/ext/admin/templates/project_overview.html
+++ b/Allura/allura/ext/admin/templates/project_overview.html
@@ -28,10 +28,7 @@
     <div class="notice">This project has been deleted and is not visible to non-admin users</div>
   {% endif %}
   {{c.metadata_admin.display(value=metadata_admin_value,
-                             show_export_control=show_export_control,
                              allow_project_delete=allow_project_delete)}}
-
-  {{c.explain_export_modal.display(content=explain_export_text)}}
 {% endblock %}
 
 {% block extra_js %}
@@ -112,29 +109,6 @@
         }
         {% endif %}
       });
-      // export control functionality
-      var $export_details = $('#export_details');
-      var $export_controlled = $('#export_controlled');
-      var $export_control_type = $('input[name=export_control_type]');
-      var $export_warning = $('#export_warning');
-      $export_controlled.change(function(){
-        if($export_controlled.is(':checked')){
-          $export_details.show();
-          $export_control_type.change();
-        }
-        else{
-          $export_details.hide();
-          $export_warning.hide();
-        }
-      });
-      $export_control_type.change(function(evt){
-        var $targ = jQuery(evt.target);
-        if ($targ.is(':checked') && $targ.val() === 'more_than_25') {
-          $export_warning.show();
-        } else {
-          $export_warning.hide();
-        }
-      }).change();
     });
   </script>
 {% endblock %}
diff --git a/Allura/allura/ext/admin/widgets.py b/Allura/allura/ext/admin/widgets.py
index 6fed753..4c877e5 100644
--- a/Allura/allura/ext/admin/widgets.py
+++ b/Allura/allura/ext/admin/widgets.py
@@ -179,7 +179,6 @@ class MetadataAdmin(ff.AdminForm):
     template = 'jinja:allura.ext.admin:templates/admin_widgets/metadata_admin.html'
     defaults = dict(
         ff.AdminForm.defaults,
-        show_export_control=False,
         enctype='multipart/form-data')
 
     class fields(ew_core.NameList):
@@ -232,10 +231,6 @@ class MetadataAdmin(ff.AdminForm):
         moved_to_url = ew.InputField(
             field_type="text", label='Moved Project to URL',
             validator=fev.URL(add_http=True, if_empty=''))
-        export_controlled = ew.InputField(
-            field_type="text", label='Export Control')
-        export_control_type = ew.InputField(
-            field_type="text", label='Export Control Type')
         delete = ew.InputField(field_type="hidden", label='Delete')
         delete_icon = ew.InputField(field_type="hidden", label='Delete Icon')
         undelete = ew.InputField(field_type="hidden", label='Undelete')
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 12d9155..304ee95 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -242,8 +242,6 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
     removal = FieldProperty(str, if_missing='')
     moved_to_url = FieldProperty(str, if_missing='')
     removal_changed_date = FieldProperty(datetime, if_missing=datetime.utcnow)
-    export_controlled = FieldProperty(bool, if_missing=False)
-    export_control_type = FieldProperty(str, if_missing=None)
     database = FieldProperty(S.Deprecated)
     database_uri = FieldProperty(S.Deprecated)
     is_root = FieldProperty(bool)
diff --git a/Allura/allura/templates_responsive/override/allura/ext/admin/templates/admin_widgets/metadata_admin.html b/Allura/allura/templates_responsive/override/allura/ext/admin/templates/admin_widgets/metadata_admin.html
index f1e0df0..9c83ab9 100644
--- a/Allura/allura/templates_responsive/override/allura/ext/admin/templates/admin_widgets/metadata_admin.html
+++ b/Allura/allura/templates_responsive/override/allura/ext/admin/templates/admin_widgets/metadata_admin.html
@@ -165,31 +165,6 @@
         </div>
     </div>
     {% endif%}
-
-    {% if show_export_control %}
-    <div id="export_control" class="new-visual-group">
-      <label for="export_controlled">Export Control: <small><a href="#" id="why_export">Why?</a></small></label>
-      <br>
-      <input id="export_controlled" name="export_controlled" type="checkbox" value="True"
-             {% if value.export_controlled == True %} checked{% endif %}> This project incorporates, accesses, calls upon or otherwise uses encryption software with a symmetric key length greater than 64 bits ("encryption"). This review does not include products that use encryption for authentication only.<br>
-      <div id="export_details" style="margin-left: 1em;{% if value.export_controlled == False %} display:none;{% endif %}">
-        <label>
-          <input name="export_control_type" type="radio" value="less_than_10"
-               {% if value.export_control_type == "less_than_10" %} checked{% endif %}> This Project has less than 10% U.S.-origin parts or components.<br>
-        </label>
-        <label>
-          <input name="export_control_type" type="radio" value="less_than_25"
-               {% if value.export_control_type == "less_than_25" %} checked{% endif %}> This Project has more than 10% but less than 25% U.S.-origin parts or components.<br>
-        </label>
-        <label>
-          <input id="export_restricted" name="export_control_type" type="radio" value="more_than_25"
-               {% if value.export_control_type == "more_than_25" %} checked{% endif %}> This Project has more than 25% U.S-origin parts or components.<br>
-        </label>
-      </div>
-      <div id="export_warning" class="notice"{% if value.export_controlled == False or value.export_control_type == "less_than_10" or value.export_control_type == "less_than_25" %} style="display:none"{% endif %}>You must notify BIS and the ENC Encryption Request Coordinator via e-mail of the Internet location (e.g., URL or Internet address) of the publicly available encryption source code or provide each of them a copy of the publicly available encryption source code. If you update or m [...]
-    </div>
-    {% endif %}
-
   </div>
   <hr class="column small-12" style="margin-top: 1em; margin-bottom: 1em;">
   <div class="column small-12">
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index a0dfd3f..004fe73 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -186,22 +186,6 @@ class TestProjectAdmin(TestController):
         proj = M.Project.query.get(shortname='test')
         assert_equals(proj.features, [u'One', u'Two'])
 
-    def test_admin_export_control(self):
-        self.app.get('/admin/')
-        with audits('change project export controlled status to True'):
-            self.app.post('/admin/update', params=dict(
-                shortname='test',
-                export_controlled='True'))
-        with out_audits('change project export controlled status to True'):
-            self.app.post('/admin/update', params=dict(
-                shortname='test',
-                summary='TL;DR',
-                export_controlled='True'))
-        with audits('change project export controlled status to False'):
-            self.app.post('/admin/update', params=dict(
-                shortname='test',
-                export_controlled='False'))
-
     @td.with_wiki
     def test_block_user_empty_data(self):
         r = self.app.post('/admin/wiki/block_user',
diff --git a/Allura/development.ini b/Allura/development.ini
index 4478d73..035a78b 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -577,9 +577,6 @@ markdown_render_max_length = 100000
 ; Don't add rel=nofollow to these domains when generating links from Markdown content
 ;nofollow_exempt_domains =
 
-; Export control choices on the project admin overview page.
-show_export_control = false
-
 ; By default project admins can soft-delete their projects.
 ; A soft-deleted project will still be in the database and visible to admins, but not to others.
 allow_project_delete = true