Skip to content

Commit

Permalink
auth_or_token decorator: set __authenticated__=True attribute (#387)
Browse files Browse the repository at this point in the history
* add an __authenticated__=True attribute to handler methods that require auth, so we can use when autogenerating api specs

* update github actions: checkout, python versions, and upload-artifacts

* instead of 3.8 -> 3.12, 3.8 -> 3.10 to avoid dealing with the pkg_resources deprecation in this unrelated PR
  • Loading branch information
Theodlz authored Sep 30, 2024
1 parent 0d85d25 commit 183539b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.repository_owner == 'cesium-ml'

steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand All @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"

- uses: actions/checkout@v4

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -48,13 +48,13 @@ jobs:
git clone https://github.com/cesium-ml/baselayer_template_app
cp -rf baselayer baselayer_template_app/
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('baselayer_template_app/package.json') }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
make test_headless
- name: Upload logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: logs
Expand Down
1 change: 1 addition & 0 deletions app/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def wrapper(self, *args, **kwargs):
)
return tornado.web.authenticated(method)(self, *args, **kwargs)

wrapper.__authenticated__ = True
return wrapper


Expand Down

0 comments on commit 183539b

Please sign in to comment.