Skip to content

Commit 9d2f35e

Browse files
committed
Merge branch 'release/0.107.0'
2 parents c1988ee + 15e4003 commit 9d2f35e

File tree

84 files changed

+792
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+792
-212
lines changed

.docker-compose.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ CAS_SERVER_URL=http://192.168.168.167:8080
1414
MFR_SERVER_URL=http://localhost:7778
1515
#SHARE_URL=http://192.168.168.167:8000/
1616
BROKER_URL=amqp://guest:[email protected]:5672/
17+
LIVE_RELOAD_DOMAIN=http://192.168.168.167:4200
1718
REDIS_URL=redis://192.168.168.167:6379/1

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ install:
105105
- cd $PROJECT_DIR
106106
- cp website/settings/local-travis.py website/settings/local.py
107107
- cp api/base/settings/local-travis.py api/base/settings/local.py
108+
- '[ -d $HOME/preprints ] || ( mkdir -p $HOME/preprints && touch $HOME/preprints/index.html )'
108109

109110
- travis_retry pip install --upgrade pip
110111
- travis_retry pip install invoke==0.13.0

CHANGELOG

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
Changelog
33
*********
44

5+
0.107.0 (2017-04-28)
6+
====================
7+
8+
- Upgrade to Django 1.11.
9+
- Remove BaseFileNode.wrapped() method.
10+
- Remove guid_string field from models.
11+
- Preprints: Add LawArxiv.
12+
- Admin: Add Date Registration Initiated to node view.
13+
- Admin: Add link between projects and registrations.
14+
515
0.106.0 (2017-04-21)
616
====================
717

addons/osfstorage/tests/test_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def test_delete_folder(self):
223223

224224
def test_delete_file(self):
225225
child = self.node_settings.get_root().append_file('Test')
226-
field_names = [f.name for f in child._meta.get_fields() if not f.is_relation and f.name not in ['id', 'guid_string', 'content_type_pk']]
226+
field_names = [f.name for f in child._meta.get_fields() if not f.is_relation and f.name not in ['id', 'content_type_pk']]
227227
child_data = {f: getattr(child, f) for f in field_names}
228228
child.delete()
229229

@@ -235,7 +235,7 @@ def test_delete_file(self):
235235
child_storage['materialized_path'] = child.materialized_path
236236
assert_equal(trashed.path, '/' + child._id)
237237
trashed_field_names = [f.name for f in child._meta.get_fields() if not f.is_relation and
238-
f.name not in ['id', 'guid_string', '_materialized_path', 'content_type_pk', '_path', 'deleted_on', 'deleted_by', 'type']]
238+
f.name not in ['id', '_materialized_path', 'content_type_pk', '_path', 'deleted_on', 'deleted_by', 'type']]
239239
for f, value in child_data.iteritems():
240240
if f in trashed_field_names:
241241
assert_equal(getattr(trashed, f), value)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.11 on 2017-04-24 21:09
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('addons_wiki', '0003_auto_20170403_2228'),
12+
]
13+
14+
operations = [
15+
migrations.RemoveField(
16+
model_name='nodewikipage',
17+
name='guid_string',
18+
),
19+
]

admin/base/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def reverse_qs(view, urlconf=None, args=None, kwargs=None, current_app=None, que
1212

1313

1414
def osf_staff_check(user):
15-
return user.is_authenticated() and user.is_staff
15+
return user.is_authenticated and user.is_staff

admin/nodes/serializers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ def serialize_node(node):
2424
'children': map(serialize_simple_node, node.nodes),
2525
'deleted': node.is_deleted,
2626
'pending_registration': node.is_pending_registration,
27+
'registered_date': node.registered_date,
2728
'creator': node.creator._id,
2829
'spam_status': node.spam_status,
2930
'spam_pro_tip': node.spam_pro_tip,
3031
'spam_data': json.dumps(node.spam_data, indent=4),
3132
'is_public': node.is_public,
33+
'registrations': [serialize_node(registration) for registration in node.registrations.all()],
34+
'registered_from': node.registered_from._id if node.registered_from else None
3235
}
3336

3437

admin/templates/nodes/node.html

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,28 @@ <h3>Node Details</h3>
232232
<td>Registration</td>
233233
<td>
234234
{% if not node.is_registration %}
235-
{{ node.is_registration }}
235+
<table class="table table-bordered table-hover">
236+
<thead>
237+
<tr>
238+
<td>Registration</td>
239+
<td>Date Created</td>
240+
<td>Pending</td>
241+
<td>Withdrawn</td>
242+
<td>Embargo</td>
243+
</tr>
244+
</thead>
245+
<tbody>
246+
{% for registration in node.registrations %}
247+
<tr>
248+
<td><a href="{{ registration.id | reverse_node }}">{{ registration.id }}</a></td>
249+
<td>{{ registration.date_created | date }}</td>
250+
<td>{{ registration.pending_registration }}</td>
251+
<td>{{ registration.withdrawn }}</td>
252+
<td>{{ registration.embargo }}</td>
253+
</tr>
254+
{% endfor %}
255+
</tbody>
256+
</table>
236257
{% else %}
237258
<table class="table table-bordered table-hover">
238259
<thead>
@@ -246,6 +267,10 @@ <h3>Node Details</h3>
246267
<td>Date Created</td>
247268
<td>{{ node.date_created | date }}</td>
248269
</tr>
270+
<tr>
271+
<td>Datetime Registered (UTC)</td>
272+
<td>{{ node.registered_date | date:"F j, Y P" }}</td>
273+
</tr>
249274
<tr>
250275
<td>Pending</td>
251276
<td>{{ node.pending_registration }}</td>
@@ -258,6 +283,10 @@ <h3>Node Details</h3>
258283
<td>Embargo</td>
259284
<td>{{ node.embargo }}</td>
260285
</tr>
286+
<tr>
287+
<td>Registered From</td>
288+
<td><a href="{% url 'nodes:node' node.registered_from %}">{{ node.registered_from }}</a></td>
289+
</tr>
261290
</tbody>
262291
</table>
263292
{% endif %}

api/base/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def origin_not_found_in_white_lists(self, origin, url):
8585
not_found = super(CorsMiddleware, self).origin_not_found_in_white_lists(origin, url)
8686
if not_found:
8787
# Check if origin is in the dynamic Institutions whitelist
88-
if url.netloc.lower() in api_settings.INSTITUTION_ORIGINS_WHITELIST:
88+
if url.netloc.lower() in api_settings.ORIGINS_WHITELIST:
8989
return
9090
# Check if a cross-origin request using the Authorization header
9191
elif not self._context.request.COOKIES:

api/base/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def get_paginated_response(self, data):
183183
node_id = kwargs.get('node_id', None)
184184
node = Node.load(node_id)
185185
user = self.request.user
186-
if target_id and not user.is_anonymous() and node.is_contributor(user):
186+
if target_id and not user.is_anonymous and node.is_contributor(user):
187187
root_target = Guid.load(target_id)
188188
if root_target:
189189
page = getattr(root_target.referent, 'root_target_page', None)

0 commit comments

Comments
 (0)