This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"type": "institutions", | |
"id": "<institution_id>" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data":[ | |
{ | |
"id":"667ad190c7ea910017f88d59", | |
"type":"institutions", | |
"attributes":{ | |
"name":"Waters LLC", | |
"description":"", | |
"iri":"https://nicholson.com/", | |
"ror_iri":"https://nixon.com/", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**GET v2/preprints/(?P<preprint_id>\w+)/institutions/$** | |
---- | |
Returns all institutional affiliations available on a Preprint. | |
* **URL Params** | |
TBD filter/sort params? | |
* **Data Params** | |
None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2024-05-30 17:30:21,851: INFO/MainProcess] sync with celery@878df8371eaa | |
[2024-05-30 17:30:21,969: ERROR/MainProcess] Received unregistered task of type 'addon_service.listeners.listen_to_queue_route'. | |
The message has been ignored and discarded. | |
Did you remember to import the module containing this task? | |
Or maybe you're using relative imports? | |
Please see | |
http://docs.celeryq.org/en/latest/internals/protocol.html | |
for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_access(node, auth, action, cas_resp): | |
"""Verify that user can perform requested action on resource. Raise appropriate | |
error code if action cannot proceed. | |
""" | |
permission = permission_map.get(action, None) | |
if permission is None: | |
raise HTTPError(http_status.HTTP_400_BAD_REQUEST) | |
# Permissions for DraftNode should be based upon the draft registration | |
if isinstance(node, DraftNode): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner | |
self.run() | |
File "/usr/local/lib/python3.12/threading.py", line 1010, in run | |
self._target(*self._args, **self._kwargs) | |
File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", line 64, in wrapper | |
fn(*args, **kwargs) | |
File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run | |
autoreload.raise_last_exception() | |
File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, redirect, session | |
import requests | |
import uuid | |
app = Flask(__name__) | |
app.secret_key = 'your_secret_key' # Needed for session management | |
# Register with the oauth provider and change the credentials to match. | |
CLIENT_ID = '<change>' | |
CLIENT_SECRET = '<change>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify, redirect, render_template_string | |
from uuid import uuid4 | |
app = Flask(__name__) | |
# In-memory database simulation | |
clients = {} # Registered clients {client_id: client_secret} | |
auth_codes = {} # Authorization codes {code: client_id} | |
tokens = {} # Tokens {access_token: client_id} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework import ( | |
exceptions, | |
permissions, | |
) | |
from addon_service.models import ( | |
ResourceReference, | |
UserReference, | |
) | |
from app.authentication import authenticate_resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2023-02-28T14:22:37.3827537Z Requested labels: ubuntu-20.04 | |
2023-02-28T14:22:37.3827583Z Job defined at: CenterForOpenScience/osf.io/.github/workflows/test-build.yml@refs/pull/10269/merge | |
2023-02-28T14:22:37.3827615Z Waiting for a runner to pick up this job... | |
2023-02-28T14:22:39.8596453Z Job is waiting for a hosted runner to come online. | |
2023-02-28T14:22:41.1245961Z Job is about to start running on the hosted runner: GitHub Actions 2 (hosted) | |
2023-02-28T14:22:44.8885383Z Current runner version: '2.301.1' | |
2023-02-28T14:22:44.8920042Z ##[group]Operating System | |
2023-02-28T14:22:44.8920749Z Ubuntu | |
2023-02-28T14:22:44.8921206Z 20.04.5 | |
2023-02-28T14:22:44.8921521Z LTS |