projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'remotes/origin/develop' into 1364-notifications-sending...
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
controllers
/
app_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/controllers/app_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/app_controller.ex
index abbe16a8823a60a0556ffc576bf5947c783612d0..5e2871f185ea7fb2d0248141dee4ef10e01cf811 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/app_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/app_controller.ex
@@
-1,10
+1,11
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AppController do
use Pleroma.Web, :controller
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AppController do
use Pleroma.Web, :controller
+ alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Repo
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Scopes
alias Pleroma.Repo
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Scopes
@@
-12,6
+13,8
@@
defmodule Pleroma.Web.MastodonAPI.AppController do
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
+ plug(OAuthScopesPlug, %{scopes: ["read"]} when action == :verify_credentials)
+
@local_mastodon_name "Mastodon-Local"
@doc "POST /api/v1/apps"
@local_mastodon_name "Mastodon-Local"
@doc "POST /api/v1/apps"