From 7e44f89cc01ee11b2165f2b6c1ea78c847e53f1a Mon Sep 17 00:00:00 2001 From: Agate Date: Tue, 21 Jul 2020 16:50:29 +0200 Subject: [PATCH 1/3] Improved OAuth documentation --- docs/swagger.yml | 71 ++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/docs/swagger.yml b/docs/swagger.yml index 66fdab420..990288b7e 100644 --- a/docs/swagger.yml +++ b/docs/swagger.yml @@ -25,7 +25,13 @@ info: Authentication -------------- - To authenticate, use OAuth. You can register your own app using the `/apps` endpoint and proceed to the OAuth flow afterwards. + To authenticate, use OAuth. You can register your own app using the `/api/v1/oauth/apps/` endpoint. Proceed to the standard OAuth flow afterwards: + + - Our authorize URL is at `/authorize` + - Our token acquisition and refresh URL is at `/api/v1/oauth/token` + - The list of supported scopes is available by clicking the `Authorize` button in the Swagger UI documentation + - Use `urn:ietf:wg:oauth:2.0:oob` as your redirect URI if you want the user to get a copy-pastable authorization code + - At the moment, endpoints that deal with admin or moderator-level content are not accessible via OAuth, only through the Web UI You can use our demo server at `https://demo.funkwhale.audio` for testing purposes. @@ -142,26 +148,30 @@ components: scopes: "read": "Read-only access to all user data" "write": "Write-only access on all user data" - "read:profile": "Read-only access to profile data" - "read:libraries": "Read-only access to library and uploads" - "read:playlists": "Read-only access to playlists" - "read:listenings": "Read-only access to listening history" - "read:favorites": "Read-only access to favorites" - "read:radios": "Read-only access to radios" "read:edits": "Read-only access to edits" - "read:notifications": "Read-only access to notifications" - "read:follows": "Read-only to follows" - "read:filters": "Read-only to to content filters" - "write:profile": "Write-only access to profile data" - "write:libraries": "Write-only access to libraries" - "write:playlists": "Write-only access to playlists" - "write:follows": "Write-only access to follows" - "write:favorites": "Write-only access to favorits" - "write:notifications": "Write-only access to notifications" - "write:radios": "Write-only access to radios" "write:edits": "Write-only access to edits" + "read:favorites": "Read-only access to favorites" + "write:favorites": "Write-only access to favorits" + "read:filters": "Read-only to to content filters" "write:filters": "Write-only access to content-filters" + "read:follows": "Read-only to follows" + "write:follows": "Write-only access to follows" + "read:libraries": "Read-only access to library and uploads" + "write:libraries": "Write-only access to libraries" + "read:listenings": "Read-only access to listening history" "write:listenings": "Write-only access to listening history" + "read:notifications": "Read-only access to notifications" + "write:notifications": "Write-only access to notifications" + "read:playlists": "Read-only access to playlists" + "write:playlists": "Write-only access to playlists" + "read:profile": "Read-only access to profile data" + "write:profile": "Write-only access to profile data" + "read:radios": "Read-only access to radios" + "write:radios": "Write-only access to radios" + "read:reports": "Read-only access to reports" + "write:reports": "Write-only access to reports" + "read:security": "Read-only access security settings" + "write:security": "write-only access security settings" jwt: type: http scheme: bearer @@ -195,7 +205,7 @@ paths: post: tags: - "Auth and security" - description: + summary: Register an OAuth application security: [] responses: @@ -225,32 +235,15 @@ paths: type: "string" summary: "A list of scopes requested by your app, separated by spaces" example: "read write:playlists write:favorites" - /api/v1/token/: + /api/v1/oauth/token/: post: tags: - "Auth and security" - summary: Get an API token - description: - Obtain a JWT token you can use for authenticating your next requests. + summary: + Request an OAuth bearer token in exchange of an authorization_code or a refresh_token security: [] responses: - '200': - description: Successfull auth - '400': - description: Invalid credentials - requestBody: - required: true - content: - application/json: - schema: - type: "object" - properties: - username: - type: "string" - example: "demo" - password: - type: "string" - example: "demo" + 200: /api/v1/auth/registration/: post: From 17869ce1f7602335231bd1c436cdd5b65cda7f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 21 Jul 2020 14:33:41 +0100 Subject: [PATCH 2/3] Add time ago fix --- changes/changelog.d/1089.bugfix | 1 + front/src/components/audio/ChannelCard.vue | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/1089.bugfix diff --git a/changes/changelog.d/1089.bugfix b/changes/changelog.d/1089.bugfix new file mode 100644 index 000000000..bc3b77439 --- /dev/null +++ b/changes/changelog.d/1089.bugfix @@ -0,0 +1 @@ +Make channel card updated times more humanly readable, add internationalization (#1089) \ No newline at end of file diff --git a/front/src/components/audio/ChannelCard.vue b/front/src/components/audio/ChannelCard.vue index 99b7e63ae..820e575ac 100644 --- a/front/src/components/audio/ChannelCard.vue +++ b/front/src/components/audio/ChannelCard.vue @@ -31,7 +31,7 @@ class="meta ellipsis" :datetime="object.artist.modification_date" :title="updatedTitle"> - {{ object.artist.modification_date | fromNow }} + %{ updatedAgo } Date: Mon, 27 Jul 2020 11:21:29 +0200 Subject: [PATCH 3/3] Version bump and changelog for 0.21.2 --- CHANGELOG | 32 +++++++++++++++++++++ api/funkwhale_api/__init__.py | 2 +- changes/changelog.d/1089.bugfix | 1 - changes/changelog.d/1104.bugfix | 1 - changes/changelog.d/1116.enhancement | 1 - changes/changelog.d/1134.enhancement | 1 - changes/changelog.d/1138.bugfix | 1 - changes/changelog.d/1145.enhancement | 1 - changes/changelog.d/1157.bugfix | 1 - changes/changelog.d/1158.bugfix | 1 - changes/changelog.d/1161.bugfix | 1 - changes/changelog.d/1165.bugfix | 1 - changes/changelog.d/1175.bugfix | 1 - changes/changelog.d/api-related.enhancement | 1 - 14 files changed, 33 insertions(+), 13 deletions(-) delete mode 100644 changes/changelog.d/1089.bugfix delete mode 100644 changes/changelog.d/1104.bugfix delete mode 100644 changes/changelog.d/1116.enhancement delete mode 100644 changes/changelog.d/1134.enhancement delete mode 100644 changes/changelog.d/1138.bugfix delete mode 100644 changes/changelog.d/1145.enhancement delete mode 100644 changes/changelog.d/1157.bugfix delete mode 100644 changes/changelog.d/1158.bugfix delete mode 100644 changes/changelog.d/1161.bugfix delete mode 100644 changes/changelog.d/1165.bugfix delete mode 100644 changes/changelog.d/1175.bugfix delete mode 100644 changes/changelog.d/api-related.enhancement diff --git a/CHANGELOG b/CHANGELOG index 56c927179..7a4fde609 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,38 @@ This changelog is viewable on the web at https://docs.funkwhale.audio/changelog. .. towncrier +0.21.2 (2020-07-27) +------------------- + +Upgrade instructions are available at +https://docs.funkwhale.audio/index.html + +Enhancements: + +- Added a new ?related=obj_id filter for artists, albums and tracks, based on tags +- Can now filter subscribed content through API (#1116) +- Support ordering=random for artists, albums, tracks and channels endpoints (#1145) +- Use role=alert on forms/toast message to improve accessibility (#1134) + + +Bugfixes: + +- Fix embedded player not working on channel serie/album (#1175) +- Fixed broken mimetype detection during import (#1165) +- Fixed crash when loading recent albums via Subsonic (#1158) +- Fixed crash with null help text in admin (#1161) +- Fixed invalid metadata when importing multi-artists tracks/albums (#1104) +- Fixed player crash when using Funkwhale as a PWA (#1157) +- Fixed wrong covert art displaying in some situations (#1138) +- Make channel card updated times more humanly readable, add internationalization (#1089) + +Contributors to this release (development, documentation, reviews): + +- Agate +- Bheesham Persaud +- CiarĂ¡n Ainsworth + + 0.21.1 (2020-06-11) ------------------- diff --git a/api/funkwhale_api/__init__.py b/api/funkwhale_api/__init__.py index 9ad0c1d71..0317f7328 100644 --- a/api/funkwhale_api/__init__.py +++ b/api/funkwhale_api/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -__version__ = "0.21.1" +__version__ = "0.21.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num diff --git a/changes/changelog.d/1089.bugfix b/changes/changelog.d/1089.bugfix deleted file mode 100644 index bc3b77439..000000000 --- a/changes/changelog.d/1089.bugfix +++ /dev/null @@ -1 +0,0 @@ -Make channel card updated times more humanly readable, add internationalization (#1089) \ No newline at end of file diff --git a/changes/changelog.d/1104.bugfix b/changes/changelog.d/1104.bugfix deleted file mode 100644 index 23e765a75..000000000 --- a/changes/changelog.d/1104.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed invalid metadata when importing multi-artists tracks/albums (#1104) diff --git a/changes/changelog.d/1116.enhancement b/changes/changelog.d/1116.enhancement deleted file mode 100644 index d8c4cfbad..000000000 --- a/changes/changelog.d/1116.enhancement +++ /dev/null @@ -1 +0,0 @@ -Can now filter subscribed content through API (#1116) \ No newline at end of file diff --git a/changes/changelog.d/1134.enhancement b/changes/changelog.d/1134.enhancement deleted file mode 100644 index 3e04439a1..000000000 --- a/changes/changelog.d/1134.enhancement +++ /dev/null @@ -1 +0,0 @@ -Use role=alert on forms/toast message to improve accessibility (#1134) diff --git a/changes/changelog.d/1138.bugfix b/changes/changelog.d/1138.bugfix deleted file mode 100644 index b65b0c08c..000000000 --- a/changes/changelog.d/1138.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed wrong covert art displaying in some situations (#1138) diff --git a/changes/changelog.d/1145.enhancement b/changes/changelog.d/1145.enhancement deleted file mode 100644 index eefc8d46d..000000000 --- a/changes/changelog.d/1145.enhancement +++ /dev/null @@ -1 +0,0 @@ -Support ordering=random for artists, albums, tracks and channels endpoints (#1145) diff --git a/changes/changelog.d/1157.bugfix b/changes/changelog.d/1157.bugfix deleted file mode 100644 index 1de17c8f0..000000000 --- a/changes/changelog.d/1157.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed player crash when using Funkwhale as a PWA (#1157) diff --git a/changes/changelog.d/1158.bugfix b/changes/changelog.d/1158.bugfix deleted file mode 100644 index ff7fdd407..000000000 --- a/changes/changelog.d/1158.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed crash when loading recent albums via Subsonic (#1158) diff --git a/changes/changelog.d/1161.bugfix b/changes/changelog.d/1161.bugfix deleted file mode 100644 index 2c602fb42..000000000 --- a/changes/changelog.d/1161.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed crash with null help text in admin (#1161) diff --git a/changes/changelog.d/1165.bugfix b/changes/changelog.d/1165.bugfix deleted file mode 100644 index e1b1b10e2..000000000 --- a/changes/changelog.d/1165.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed broken mimetype detection during import (#1165) diff --git a/changes/changelog.d/1175.bugfix b/changes/changelog.d/1175.bugfix deleted file mode 100644 index 29283b2d3..000000000 --- a/changes/changelog.d/1175.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix embedded player not working on channel serie/album (#1175) \ No newline at end of file diff --git a/changes/changelog.d/api-related.enhancement b/changes/changelog.d/api-related.enhancement deleted file mode 100644 index 82be1c0f0..000000000 --- a/changes/changelog.d/api-related.enhancement +++ /dev/null @@ -1 +0,0 @@ -Added a new ?related=obj_id filter for artists, albums and tracks, based on tags