Skip to content

Commit 8d02f7c

Browse files
committed
Merge branch 'release/0.126.0'
2 parents be8dd59 + de1715f commit 8d02f7c

File tree

295 files changed

+8407
-2130
lines changed

Some content is hidden

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

295 files changed

+8407
-2130
lines changed

CHANGELOG

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,90 @@
22
Changelog
33
*********
44

5+
0.126.0 (2017-12-14)
6+
====================
7+
- Citation Widget: Some Journal Styles Missing
8+
- Display registration status of DraftRegistrations (if any) in Prereg
9+
- Subsequent files do not receive a modal when copied over to a folder
10+
- Unable to authorize figshare accounts with unicode in name
11+
- fix incorrect method name in oauth node config js
12+
- In Fangorn, Github's [Open] button only points to the default branch
13+
- Popular Public and New & Noteworthy -- making a project private causes error
14+
- Admin app: accessing list of user's permissions 502s
15+
- Unable to mark node as Ham
16+
- Templating a registration breaks and creates a malformed registration
17+
- Withdrawn registration pages cause sentry errors
18+
- Registration created both with and w/o prereg review -- case where user selects "register w/out review" first
19+
- OwnCloud incorrectly logs folder deletions as "file" in logs
20+
- Should not show "Add important information..." in wiki widget for registrations
21+
- Admin app, check group permissions (not system tag)
22+
- Remove urls for folder in api
23+
- Download URLs 404 for Box file revisions
24+
- Multi-field filtering is broken on staging and production
25+
- Citations preview should show the full name field if the individual name sections are blank
26+
- Incorrect error message is shown for Dataverse 500 error
27+
- File checked out to Alex DeHaven after Prereg Challenge submission is approved.
28+
- Don't use {} as a attribute default value
29+
- [admin app] Searching for user names that contain periods or commas returns 502
30+
- Forks total includes registrations
31+
- Fix spelling for new VOL section in project settings
32+
- Special characters do not render on registration forms
33+
- "Sign In -->" for Institutions with custom domains goes to wrong url -- incorrectly routes already-logged-in users to their dashboard
34+
- Add unregistered contributor modal doesn't strip leading/trailing spaces from email address
35+
- Failing email validation in 'add unreg contrib' modal permanently disables 'Add' button
36+
- Add loading indicator when authorizing Dataverse or importing auth from profile to project settings
37+
- Prevent SendGrid from sending emails to randomly generated users locally
38+
- Make support email address configurable
39+
- Project titles on the Project Overview page wrap in undesirable way
40+
- API: View-only parameter needs to be added to all WB links
41+
- Username not displaying properly in activity logs of My Projects page
42+
- Error sending Keen data to pageviews: <An error occurred!>
43+
- Iterative 0.126.0 Fixes
44+
- "Add-ons" and "Settings" tabs display on public projects for non-contributors
45+
- Increase registration test failure allowance
46+
- Project navigation breaks, 'settings' shifts strangely, sometimes shows 'comments'
47+
- The GitHub Fangorn interface lacks a Download-as-zip button for folders
48+
- Add Arabixiv logo for sign up page
49+
- Clean up gravatar specific methods
50+
- Search in 'add link' should show all your projects by default
51+
- Incorrect grammar in My Projects slow load error text
52+
- Clear Deactivate Flag on User Accounts
53+
- Add new logo / branding to OSF for Meetings
54+
- Add user's registrations and preprints relationships to user serializer
55+
- There should not be a link to Box.com in the Welcome to the OSF email
56+
- Users Should be Alerted of Maintenance on All Pages
57+
- Add Embargo Date Management to Admin App
58+
- Cancel changes button on admin preprint config
59+
- Move Number of Forks, Links, Templates to Analytics Tab
60+
- Move "Add-ons" to own tab on Node Overview, out of Project Settings
61+
- API: Attempting to PATCH a registration needs corrected error code & message
62+
- Remove QA test items from elastic search
63+
- Admin: Checking "Domain redirect enabled" with no domain redirects to OSF landing page
64+
- 'Sign Up' webpage title issue
65+
- Send users an email about fork fail/success
66+
- Update language in engagement email
67+
- Always show dropdown on Configure Wiki Settings
68+
- Add project logs to admin app
69+
- Search by contributor's profile information
70+
- Enable account merging in admin app
71+
- Email users who have started but not finished a pre-reg application
72+
- Mod Meta Deletion followup
73+
- Trigger for wiki widget "Read More" does not match display field length
74+
- Improve node category visual recognition
75+
- Allow tags to be added after a registration is created
76+
- Remove WBv0-using code from the OSF
77+
- Show preprint provider logos in Admin
78+
- Add metatags to projects and components for better Zotero export
79+
- Add ability to rename a file on the file detail page
80+
- Change placeholder text in dashboard search box
81+
- Missing Restriction On String Size On Given, Middle, Family name, etc
82+
- Add "latest" version tag and have BAPI use this by default
83+
- Add links to status page
84+
- Allow ampersand in project description
85+
- Character count increase and better count for comments
86+
- Add flag to indicate custom highlighted taxonomy is used
87+
- Change FAQ link
88+
589
0.125.0 (2017-12-05)
690
====================
791

@@ -22,7 +106,24 @@ Changelog
22106
0.124.0 (2017-11-13)
23107
====================
24108

25-
- Critical bug fixes
109+
- Browser plugin for preprint partner preview
110+
- Importing preprint provider on production - taxonomies fix
111+
- Admin import should be fault tolerant for new fields
112+
- Titles for private linked nodes are visible in logs
113+
- Can't find unclaimed record for user
114+
- Opening a file in another tab using the "⌘" symbol causes the Files widget to perform inadequately
115+
- Make undecorated links in the wiki clickable
116+
- Add notification email on preprint submission
117+
- Include Biobliographic/Non-bibliographic option in Add Contributor Modal
118+
- Add Physical COS Address to Transactional\Notification Emails
119+
- Fix small errors on OSF Metrics
120+
- Add image sizing to wiki
121+
- Make "import contributors" a one-click process
122+
- Really allow users to affiliate registrations
123+
- Detect Child Components as Deleting Project
124+
- Improve the prereg Challenge approved submission email to encourage promotion on social media
125+
- Add original publication date field for preprints, citation changes
126+
- Update docker and docker-sync settings
26127

27128
0.123.0 (2017-10-26)
28129
====================

PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@
1313

1414
<!-- Briefly describe or list your changes -->
1515

16-
## Side effects
16+
## QA Notes
1717

18-
<!--Any possible side effects? -->
18+
<!-- Does this change need QA? If so, this section is required.
19+
- Is cross-browser testing required/recommended?
20+
- Is API testing required/recommended?
21+
- What pages on the OSF should be tested?
22+
- What edge cases should QA be aware of?
23+
-->
1924

25+
## Side Effects
26+
27+
<!-- Any possible side effects? -->
2028

2129
## Ticket
2230

addons.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"googledrive",
1919
"bitbucket"
2020
],
21+
"addons_default": [
22+
"osfstorage"
23+
],
2124
"addons_archivable": {
2225
"osfstorage": "full",
2326
"box": "partial",

addons/base/models.py

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from website import settings
1818
from addons.base import logger, serializer
1919
from website.oauth.signals import oauth_complete
20-
from website.util import waterbutler_url_for
20+
from website.util import waterbutler_api_url_for
2121

2222
lookup = TemplateLookup(
2323
directories=[
@@ -561,26 +561,37 @@ def archive_folder_name(self):
561561
return name
562562

563563
def _get_fileobj_child_metadata(self, filenode, user, cookie=None, version=None):
564-
kwargs = dict(
565-
provider=self.config.short_name,
566-
path=filenode.get('path', ''),
567-
node=self.owner,
564+
565+
kwargs = {}
566+
if version:
567+
kwargs['version'] = version
568+
if cookie:
569+
kwargs['cookie'] = cookie
570+
elif user:
571+
kwargs['cookie'] = user.get_or_create_cookie()
572+
573+
metadata_url = waterbutler_api_url_for(
574+
self.owner._id,
575+
self.config.short_name,
576+
path=filenode.get('path', '/'),
568577
user=user,
569578
view_only=True,
579+
_internal=True,
580+
**kwargs
570581
)
571-
if cookie:
572-
kwargs['cookie'] = cookie
573-
if version:
574-
kwargs['version'] = version
575-
metadata_url = waterbutler_url_for('metadata', _internal=True, **kwargs)
576582

577583
res = requests.get(metadata_url)
584+
578585
if res.status_code != 200:
579586
raise HTTPError(res.status_code, data={'error': res.json()})
580587

581588
# TODO: better throttling?
582589
time.sleep(1.0 / 5.0)
583-
return res.json().get('data', [])
590+
591+
data = res.json().get('data', None)
592+
if data:
593+
return [child['attributes'] for child in data]
594+
return []
584595

585596
def _get_file_tree(self, filenode=None, user=None, cookie=None, version=None):
586597
"""
@@ -591,7 +602,7 @@ def _get_file_tree(self, filenode=None, user=None, cookie=None, version=None):
591602
'kind': 'folder',
592603
'name': self.root_node.name,
593604
}
594-
if filenode.get('kind') == 'file' or 'size' in filenode:
605+
if filenode.get('kind') == 'file':
595606
return filenode
596607

597608
kwargs = {

addons/base/tests/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ def test_widget_view_complete(self):
309309
)
310310
assert_true(self.node_settings.complete)
311311
assert_equal(self.node_settings.list_id, 'Fake Key')
312-
url = self.project.api_url_for('{0}_widget'.format(self.ADDON_SHORT_NAME))
313-
res = self.app.get(url, auth=self.user.auth).json
312+
313+
res = self.citationsProvider().widget(self.project.get_addon(self.ADDON_SHORT_NAME))
314314

315315
assert_true(res['complete'])
316316
assert_equal(res['list_id'], 'Fake Key')
@@ -321,8 +321,8 @@ def test_widget_view_incomplete(self):
321321
self.node_settings.save()
322322
assert_false(self.node_settings.complete)
323323
assert_equal(self.node_settings.list_id, None)
324-
url = self.project.api_url_for('{0}_widget'.format(self.ADDON_SHORT_NAME))
325-
res = self.app.get(url, auth=self.user.auth).json
324+
325+
res = self.citationsProvider().widget(self.project.get_addon(self.ADDON_SHORT_NAME))
326326

327327
assert_false(res['complete'])
328328
assert_is_none(res['list_id'])

addons/base/views.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from osf.models import (BaseFileNode, TrashedFileNode,
3636
OSFUser, AbstractNode,
3737
NodeLog, DraftRegistration, MetaSchema)
38-
from website.profile.utils import get_gravatar
38+
from website.profile.utils import get_profile_image_url
3939
from website.project import decorators
4040
from website.project.decorators import must_be_contributor_or_public, must_be_valid_project
4141
from website.project.utils import serialize_node
@@ -195,7 +195,7 @@ def check_access(node, auth, action, cas_resp):
195195
return True
196196
parent = parent.parent_node
197197

198-
# Users with the PREREG_ADMIN_TAG should be allowed to download files
198+
# Users with the prereg admin permission should be allowed to download files
199199
# from prereg challenge draft registrations.
200200
try:
201201
prereg_schema = MetaSchema.objects.get(name='Prereg Challenge', schema_version=2)
@@ -207,7 +207,7 @@ def check_access(node, auth, action, cas_resp):
207207
if action == 'download' and \
208208
auth.user is not None and \
209209
prereg_draft_registration.count() > 0 and \
210-
settings.PREREG_ADMIN_TAG in auth.user.system_tags:
210+
auth.user.has_perm('osf.administer_prereg'):
211211
return True
212212
except MetaSchema.DoesNotExist:
213213
pass
@@ -409,6 +409,7 @@ def create_waterbutler_log(payload, **kwargs):
409409
destination_path=payload['source']['materialized'],
410410
source_addon=payload['source']['addon'],
411411
destination_addon=payload['destination']['addon'],
412+
osf_support_email=settings.OSF_SUPPORT_EMAIL
412413
)
413414

414415
if payload.get('errors'):
@@ -568,7 +569,7 @@ def addon_deleted_file(auth, node, error_type='BLAME_PROVIDER', **kwargs):
568569
'render': None,
569570
'sharejs': None,
570571
'mfr': settings.MFR_SERVER_URL,
571-
'gravatar': get_gravatar(auth.user, 25),
572+
'profile_image': get_profile_image_url(auth.user, 25),
572573
'files': node.web_url_for('collect_file_trees'),
573574
},
574575
'extra': {},
@@ -731,6 +732,7 @@ def addon_view_file(auth, node, file_node, version):
731732
'direct': None,
732733
'mode': 'render',
733734
'action': 'download',
735+
'public_file': node.is_public,
734736
})
735737
)
736738

@@ -744,7 +746,7 @@ def addon_view_file(auth, node, file_node, version):
744746
'render': render_url.url,
745747
'mfr': settings.MFR_SERVER_URL,
746748
'sharejs': wiki_settings.SHAREJS_URL,
747-
'gravatar': get_gravatar(auth.user, 25),
749+
'profile_image': get_profile_image_url(auth.user, 25),
748750
'files': node.web_url_for('collect_file_trees'),
749751
'archived_from': get_archived_from_url(node, file_node) if node.is_registration else None,
750752
},

addons/dataverse/static/dataverseNodeConfig.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function ViewModel(url) {
2929
self.loadedSettings = ko.observable(false);
3030
self.loadedDatasets = ko.observable(false);
3131
self.submitting = ko.observable(false);
32+
self.authorizing = ko.observable(false);
3233

3334
self.dataverses = ko.observableArray([]);
3435
self.datasets = ko.observableArray([]);
@@ -72,8 +73,7 @@ function ViewModel(url) {
7273
self.messages = {
7374
userSettingsError: ko.pureComputed(function() {
7475
return 'Could not retrieve settings. Please refresh the page or ' +
75-
'contact <a href="mailto: support@osf.io">support@osf.io</a> if the ' +
76-
'problem persists.';
76+
'contact ' + $osf.osfSupportLink() + ' if the problem persists.';
7777
}),
7878
confirmDeauth: ko.pureComputed(function() {
7979
return 'Are you sure you want to remove this ' + self.addonName + ' account?';
@@ -93,8 +93,7 @@ function ViewModel(url) {
9393
authError: ko.pureComputed(function() {
9494
return 'Sorry, but there was a problem connecting to that instance of Dataverse. It ' +
9595
'is likely that the instance hasn\'t been upgraded to Dataverse 4.0. If you ' +
96-
'have any questions or believe this to be an error, please contact ' +
97-
'support@osf.io.';
96+
'have any questions or believe this to be an error, please contact ' + $osf.osfSupportEmail();
9897
}),
9998
tokenImportSuccess: ko.pureComputed(function() {
10099
return 'Successfully imported access token from profile.';
@@ -104,8 +103,7 @@ function ViewModel(url) {
104103
}),
105104
updateAccountsError: ko.pureComputed(function() {
106105
return 'Could not retrieve ' + self.addonName + ' account list at ' +
107-
'this time. Please refresh the page. If the problem persists, email ' +
108-
'<a href="mailto:support@osf.io">support@osf.io</a>.';
106+
'this time. Please refresh the page. If the problem persists, email ' + $osf.osfSupportLink();
109107
}),
110108
datasetDeaccessioned: ko.pureComputed(function() {
111109
return 'This dataset has already been deaccessioned on Dataverse ' +
@@ -123,12 +121,12 @@ function ViewModel(url) {
123121
}),
124122
setDatasetError: ko.pureComputed(function() {
125123
return 'Could not connect to this dataset. Please refresh the page or ' +
126-
'contact <a href="mailto: support@osf.io">support@osf.io</a> if the ' +
124+
'contact ' + $osf.osfSupportLink() +' if the ' +
127125
'problem persists.';
128126
}),
129127
getDatasetsError: ko.pureComputed(function() {
130128
return 'Could not load datasets. Please refresh the page or ' +
131-
'contact <a href="mailto: support@osf.io">support@osf.io</a> if the ' +
129+
'contact ' + $osf.osfSupportLink() +' if the ' +
132130
'problem persists.';
133131
})
134132
};
@@ -267,6 +265,7 @@ ViewModel.prototype.updateFromData = function(data) {
267265
ViewModel.prototype.clearModal = function() {
268266
var self = this;
269267
self.message('');
268+
self.authorizing(false);
270269
self.messageClass('text-info');
271270
self.apiToken(null);
272271
self.selectedHost(null);
@@ -297,7 +296,7 @@ ViewModel.prototype.setInfo = function() {
297296
}).fail(function(xhr, textStatus, error) {
298297
self.submitting(false);
299298
var errorMessage = (xhr.status === 410) ? self.messages.datasetDeaccessioned :
300-
(xhr.status = 406) ? self.messages.forbiddenCharacters : self.messages.setDatasetError;
299+
(xhr.status === 406) ? self.messages.forbiddenCharacters : self.messages.setDatasetError;
301300
self.changeMessage(errorMessage, 'text-danger');
302301
Raven.captureMessage('Could not authenticate with Dataverse', {
303302
extra: {
@@ -358,22 +357,27 @@ ViewModel.prototype.sendAuth = function() {
358357

359358
// Selection should not be empty
360359
if( !self.selectedHost() ){
361-
self.changeMessage("Please select a Dataverse repository.", 'text-danger');
360+
self.changeMessage('Please select a Dataverse repository.', 'text-danger');
362361
return;
363362
}
363+
364364
var url = self.urls().create;
365+
366+
self.authorizing(true);
365367
return $osf.postJSON(
366368
url,
367369
ko.toJS({
368370
host: self.host,
369371
api_token: self.apiToken
370372
})
371373
).done(function() {
374+
self.authorizing(false);
372375
self.clearModal();
373376
$modal.modal('hide');
374377
self.userHasAuth(true);
375378
self.importAuth();
376379
}).fail(function(xhr, textStatus, error) {
380+
self.authorizing(false);
377381
var errorMessage = (xhr.status === 401) ? self.messages.authInvalid : self.messages.authError;
378382
self.changeMessage(errorMessage, 'text-danger');
379383
Raven.captureMessage('Could not authenticate with Dataverse', {

0 commit comments

Comments
 (0)