Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jeff
pleroma
Commits
d1de0a30
Commit
d1de0a30
authored
6 years ago
by
Eugenij
Browse files
Options
Downloads
Patches
Plain Diff
Include admins in nodeinfo
parent
10248d86
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+1
-3
1 addition, 3 deletions
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
test/web/node_info_test.exs
+4
-2
4 additions, 2 deletions
test/web/node_info_test.exs
with
5 additions
and
5 deletions
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+
1
−
3
View file @
d1de0a30
...
...
@@ -6,7 +6,6 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
use
Pleroma
.
Web
,
:controller
alias
Pleroma
.
Config
alias
Pleroma
.
Repo
alias
Pleroma
.
Stats
alias
Pleroma
.
User
alias
Pleroma
.
Web
...
...
@@ -86,8 +85,7 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
end
staff_accounts
=
User
.
moderator_user_query
()
|>
Repo
.
all
()
User
.
all_superusers
()
|>
Enum
.
map
(
fn
u
->
u
.
ap_id
end
)
mrf_user_allowlist
=
...
...
This diff is collapsed.
Click to expand it.
test/web/node_info_test.exs
+
4
−
2
View file @
d1de0a30
...
...
@@ -8,7 +8,8 @@ defmodule Pleroma.Web.NodeInfoTest do
import
Pleroma
.
Factory
test
"nodeinfo shows staff accounts"
,
%{
conn:
conn
}
do
user
=
insert
(
:user
,
%{
local:
true
,
info:
%{
is_moderator:
true
}})
moderator
=
insert
(
:user
,
%{
local:
true
,
info:
%{
is_moderator:
true
}})
admin
=
insert
(
:user
,
%{
local:
true
,
info:
%{
is_admin:
true
}})
conn
=
conn
...
...
@@ -16,7 +17,8 @@ defmodule Pleroma.Web.NodeInfoTest do
assert
result
=
json_response
(
conn
,
200
)
assert
user
.
ap_id
in
result
[
"metadata"
][
"staffAccounts"
]
assert
moderator
.
ap_id
in
result
[
"metadata"
][
"staffAccounts"
]
assert
admin
.
ap_id
in
result
[
"metadata"
][
"staffAccounts"
]
end
test
"nodeinfo shows restricted nicknames"
,
%{
conn:
conn
}
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment