projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma]
/
lib
/
pleroma
/
web
/
admin_api
/
controllers
/
chat_controller.ex
diff --git
a/lib/pleroma/web/admin_api/controllers/chat_controller.ex
b/lib/pleroma/web/admin_api/controllers/chat_controller.ex
index 967600d69acaef52748dbc3460c7b822090c4fdc..ff20c8604360d2a33044df8e019da7b73958e6e3 100644
(file)
--- a/
lib/pleroma/web/admin_api/controllers/chat_controller.ex
+++ b/
lib/pleroma/web/admin_api/controllers/chat_controller.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.AdminAPI.ChatController do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.AdminAPI.ChatController do
@@
-10,10
+10,10
@@
defmodule Pleroma.Web.AdminAPI.ChatController do
alias Pleroma.Chat.MessageReference
alias Pleroma.ModerationLog
alias Pleroma.Pagination
alias Pleroma.Chat.MessageReference
alias Pleroma.ModerationLog
alias Pleroma.Pagination
- alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Web.AdminAPI
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.PleromaAPI.Chat.MessageReferenceView
alias Pleroma.Web.AdminAPI
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.PleromaAPI.Chat.MessageReferenceView
+ alias Pleroma.Web.Plugs.OAuthScopesPlug
require Logger
require Logger
@@
-21,12
+21,12
@@
defmodule Pleroma.Web.AdminAPI.ChatController do
plug(
OAuthScopesPlug,
plug(
OAuthScopesPlug,
- %{scopes: ["
read:chats"], admin: true
} when action in [:show, :messages]
+ %{scopes: ["
admin:read:chats"]
} when action in [:show, :messages]
)
plug(
OAuthScopesPlug,
)
plug(
OAuthScopesPlug,
- %{scopes: ["
write:chats"], admin: true
} when action in [:delete_message]
+ %{scopes: ["
admin:write:chats"]
} when action in [:delete_message]
)
action_fallback(Pleroma.Web.AdminAPI.FallbackController)
)
action_fallback(Pleroma.Web.AdminAPI.FallbackController)