ChatController: Use new oauth scope *:chats.
This commit is contained in:
parent
f77d4a302d
commit
f4cf4ae16e
3 changed files with 17 additions and 17 deletions
|
|
@ -33,7 +33,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["write"]
|
||||
"oAuth" => ["write:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["write"]
|
||||
"oAuth" => ["write:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["write"]
|
||||
"oAuth" => ["write:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["read"]
|
||||
"oAuth" => ["read:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["read"]
|
||||
"oAuth" => ["read:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["write"]
|
||||
"oAuth" => ["write:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
},
|
||||
security: [
|
||||
%{
|
||||
"oAuth" => ["write"]
|
||||
"oAuth" => ["write:chats"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
|
|||
|
||||
plug(
|
||||
OAuthScopesPlug,
|
||||
%{scopes: ["write:statuses"]}
|
||||
%{scopes: ["write:chats"]}
|
||||
when action in [
|
||||
:post_chat_message,
|
||||
:create,
|
||||
|
|
@ -35,7 +35,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
|
|||
|
||||
plug(
|
||||
OAuthScopesPlug,
|
||||
%{scopes: ["read:statuses"]} when action in [:messages, :index, :show]
|
||||
%{scopes: ["read:chats"]} when action in [:messages, :index, :show]
|
||||
)
|
||||
|
||||
plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue