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
551d80cc
Commit
551d80cc
authored
6 years ago
by
lain
Browse files
Options
Downloads
Patches
Plain Diff
Expose restricted names in nodeinfo.
parent
91724d16
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
+2
-1
2 additions, 1 deletion
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
test/web/node_info_test.exs
+11
-0
11 additions, 0 deletions
test/web/node_info_test.exs
with
13 additions
and
1 deletion
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+
2
−
1
View file @
551d80cc
...
...
@@ -138,7 +138,8 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
},
accountActivationRequired:
Keyword
.
get
(
instance
,
:account_activation_required
,
false
),
invitesEnabled:
Keyword
.
get
(
instance
,
:invites_enabled
,
false
),
features:
features
features:
features
,
restrictedNicknames:
Pleroma
.
Config
.
get
([
Pleroma
.
User
,
:restricted_nicknames
])
}
}
...
...
This diff is collapsed.
Click to expand it.
test/web/node_info_test.exs
+
11
−
0
View file @
551d80cc
...
...
@@ -19,6 +19,17 @@ defmodule Pleroma.Web.NodeInfoTest do
assert
user
.
ap_id
in
result
[
"metadata"
][
"staffAccounts"
]
end
test
"nodeinfo shows restricted nicknames"
,
%{
conn:
conn
}
do
conn
=
conn
|>
get
(
"/nodeinfo/2.0.json"
)
assert
result
=
json_response
(
conn
,
200
)
assert
Pleroma
.
Config
.
get
([
Pleroma
.
User
,
:restricted_nicknames
])
==
result
[
"metadata"
][
"restrictedNicknames"
]
end
test
"returns 404 when federation is disabled"
,
%{
conn:
conn
}
do
instance
=
Application
.
get_env
(
:pleroma
,
:instance
)
...
...
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