Skip to content

Commit

Permalink
Merge pull request #650 from CSCfi/stable
Browse files Browse the repository at this point in the history
Merge stable to master v0.9.34-rc2
  • Loading branch information
MattiasLevlin authored Dec 11, 2020
2 parents a0f17f0 + dcf8b1d commit 00992f8
Show file tree
Hide file tree
Showing 38 changed files with 2,178 additions and 867 deletions.
8 changes: 6 additions & 2 deletions etsin_finder/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def _get_test_app_config():
'MAIL_USERNAME': '',
'MAIL_PASSWORD': '',
'MAIL_DEFAULT_SENDER': '[email protected]',
'SSO_PREFIX': 'fd_test_csc_fi',
'SSO': {
'PREFIX': 'fd_test_csc_fi',
},
'DOWNLOAD_API_V2': {
'ENABLED': True,
'HOST': 'mock-download',
Expand All @@ -92,7 +94,9 @@ def _get_app_config_for_travis():
'APP_LOG_PATH': '/var/log/etsin_finder/etsin_finder.log',
'DEBUG': True,
'SECRET_KEY': 'cb3c5d29f16eda4e46fb77c14d6a75f9ab23e6df95c84e32',
'SSO_PREFIX': 'fd_test_csc_fi',
'SSO': {
'PREFIX': 'fd_test_csc_fi',
},
'DOWNLOAD_API_V2': {
'ENABLED': True,
'HOST': 'mock-download',
Expand Down
5 changes: 2 additions & 3 deletions etsin_finder/authentication_fairdata_sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from etsin_finder.app import app
from etsin_finder.log import log
from etsin_finder.app_config import get_app_config
from etsin_finder.saml_config import get_sso_key
from etsin_finder.utils import executing_travis

def get_sso_environment_prefix():
Expand All @@ -27,7 +26,7 @@ def get_sso_environment_prefix():
session_data (string): String that defines what the SSO environment is
"""
environment_string = get_app_config(app.testing).get('SSO_PREFIX')
environment_string = get_app_config(app.testing).get('SSO').get('PREFIX')
return environment_string

def get_decrypted_sso_session_details():
Expand All @@ -37,7 +36,7 @@ def get_decrypted_sso_session_details():
decrypted_fd_sso_session(list): List of decrypted cookies
"""
key = get_sso_key()
key = get_app_config(app.testing).get('SSO').get('KEY')
sso_environment_and_session = get_sso_environment_prefix() + '_fd_sso_session'
if request.cookies.getlist(sso_environment_and_session):
fd_sso_session = request.cookies.getlist(sso_environment_and_session)
Expand Down
2 changes: 1 addition & 1 deletion etsin_finder/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def user_can_view_dataset(cr_id):
[type] -- [description]
"""
cr = cr_service.get_catalog_record(cr_id, False, False)
cr = cr_service.get_catalog_record(cr_id, True, False)
if cr is None:
return False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ exports[`Qvain should render correctly 1`] = `
datasetLoading={false}
/>
<StickyHeader
clearSubmitResponse={[Function]}
datasetError={false}
datasetLoading={false}
handleSubmitError={[Function]}
Expand Down Expand Up @@ -121,37 +122,6 @@ exports[`Qvain should render correctly 1`] = `
</card__QvainContainer>
`;

exports[`Qvain.Description should render <Description /> 1`] = `
<div
className="container"
>
<title__SectionTitle>
<Translate
component="span"
content="qvain.description.title"
/>
<Tooltip
align="Right"
close={[Function]}
isOpen={false}
text={<DescriptionInfo />}
>
<HelpIcon
aria-label="Description info"
onClick={[Function]}
/>
</Tooltip>
</title__SectionTitle>
<DescriptionField />
<IssuedDateField />
<OtherIdentifierField />
<FieldOfScienceField />
<LanguageField />
<KeywordsField />
<SubjectHeadingsField />
</div>
`;

exports[`Qvain.Description should render <DescriptionField /> 1`] = `
<div
className="container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,21 @@ exports[`Qvain should render correctly 1`] = `
"toBackend": [Function],
"validationError": null,
},
"Submit": Submit {
"Qvain": [Circular],
"checkDoiCompability": [Function],
"createNewDraft": [Function],
"error": undefined,
"isLoading": false,
"mergeDraft": [Function],
"publishDraft": [Function],
"publishNewDataset": [Function],
"republish": [Function],
"response": null,
"savePublishedAsDraft": [Function],
"updateDataset": [Function],
"useDoiModalIsOpen": false,
},
"Temporals": Temporals {
"Model": [Function],
"Parent": [Circular],
Expand All @@ -600,6 +615,7 @@ exports[`Qvain should render correctly 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -1050,6 +1066,7 @@ exports[`Qvain should render correctly 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -2000,6 +2017,21 @@ exports[`Qvain.Description should render <Description /> 1`] = `
"toBackend": [Function],
"validationError": null,
},
"Submit": Submit {
"Qvain": [Circular],
"checkDoiCompability": [Function],
"createNewDraft": [Function],
"error": undefined,
"isLoading": false,
"mergeDraft": [Function],
"publishDraft": [Function],
"publishNewDataset": [Function],
"republish": [Function],
"response": null,
"savePublishedAsDraft": [Function],
"updateDataset": [Function],
"useDoiModalIsOpen": false,
},
"Temporals": Temporals {
"Model": [Function],
"Parent": [Circular],
Expand All @@ -2009,6 +2041,7 @@ exports[`Qvain.Description should render <Description /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -2459,6 +2492,7 @@ exports[`Qvain.Description should render <Description /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -3409,6 +3443,21 @@ exports[`Qvain.Description should render <DescriptionField /> 1`] = `
"toBackend": [Function],
"validationError": null,
},
"Submit": Submit {
"Qvain": [Circular],
"checkDoiCompability": [Function],
"createNewDraft": [Function],
"error": undefined,
"isLoading": false,
"mergeDraft": [Function],
"publishDraft": [Function],
"publishNewDataset": [Function],
"republish": [Function],
"response": null,
"savePublishedAsDraft": [Function],
"updateDataset": [Function],
"useDoiModalIsOpen": false,
},
"Temporals": Temporals {
"Model": [Function],
"Parent": [Circular],
Expand All @@ -3418,6 +3467,7 @@ exports[`Qvain.Description should render <DescriptionField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -3868,6 +3918,7 @@ exports[`Qvain.Description should render <DescriptionField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -4818,6 +4869,21 @@ exports[`Qvain.Description should render <FieldOfScienceField /> 1`] = `
"toBackend": [Function],
"validationError": null,
},
"Submit": Submit {
"Qvain": [Circular],
"checkDoiCompability": [Function],
"createNewDraft": [Function],
"error": undefined,
"isLoading": false,
"mergeDraft": [Function],
"publishDraft": [Function],
"publishNewDataset": [Function],
"republish": [Function],
"response": null,
"savePublishedAsDraft": [Function],
"updateDataset": [Function],
"useDoiModalIsOpen": false,
},
"Temporals": Temporals {
"Model": [Function],
"Parent": [Circular],
Expand All @@ -4827,6 +4893,7 @@ exports[`Qvain.Description should render <FieldOfScienceField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -5277,6 +5344,7 @@ exports[`Qvain.Description should render <FieldOfScienceField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -6227,6 +6295,21 @@ exports[`Qvain.Description should render <KeywordsField /> 1`] = `
"toBackend": [Function],
"validationError": null,
},
"Submit": Submit {
"Qvain": [Circular],
"checkDoiCompability": [Function],
"createNewDraft": [Function],
"error": undefined,
"isLoading": false,
"mergeDraft": [Function],
"publishDraft": [Function],
"publishNewDataset": [Function],
"republish": [Function],
"response": null,
"savePublishedAsDraft": [Function],
"updateDataset": [Function],
"useDoiModalIsOpen": false,
},
"Temporals": Temporals {
"Model": [Function],
"Parent": [Circular],
Expand All @@ -6236,6 +6319,7 @@ exports[`Qvain.Description should render <KeywordsField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -6686,6 +6770,7 @@ exports[`Qvain.Description should render <KeywordsField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -7636,6 +7721,21 @@ exports[`Qvain.Description should render <OtherIdentifierField /> 1`] = `
"toBackend": [Function],
"validationError": null,
},
"Submit": Submit {
"Qvain": [Circular],
"checkDoiCompability": [Function],
"createNewDraft": [Function],
"error": undefined,
"isLoading": false,
"mergeDraft": [Function],
"publishDraft": [Function],
"publishNewDataset": [Function],
"republish": [Function],
"response": null,
"savePublishedAsDraft": [Function],
"updateDataset": [Function],
"useDoiModalIsOpen": false,
},
"Temporals": Temporals {
"Model": [Function],
"Parent": [Circular],
Expand All @@ -7645,6 +7745,7 @@ exports[`Qvain.Description should render <OtherIdentifierField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down Expand Up @@ -8095,6 +8196,7 @@ exports[`Qvain.Description should render <OtherIdentifierField /> 1`] = `
"detachRefs": [Function],
"editMode": false,
"fieldName": "temporals",
"fromBackend": [Function],
"hasChanged": false,
"inEdit": Object {
"endDate": undefined,
Expand Down
Loading

0 comments on commit 00992f8

Please sign in to comment.