Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
ff71e06a
Verified
Commit
ff71e06a
authored
Jan 23, 2023
by
Chocobozzz
Browse files
Add user registration policy info
parent
4115f200
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/src/app/shared/shared-instance/instance-features-table.component.html
View file @
ff71e06a
...
...
@@ -18,10 +18,9 @@
</tr>
<tr>
<th
i18n
class=
"label"
scope=
"row"
>
User registration allowed
</th>
<td>
<my-feature-boolean
[value]=
"serverConfig.signup.allowed"
></my-feature-boolean>
</td>
<th
i18n
class=
"label"
scope=
"row"
>
User registration
</th>
<td
class=
"value"
>
{{ buildRegistrationLabel() }}
</td>
</tr>
<tr>
...
...
client/src/app/shared/shared-instance/instance-features-table.component.ts
View file @
ff71e06a
...
...
@@ -56,6 +56,15 @@ export class InstanceFeaturesTableComponent implements OnInit {
if
(
policy
===
'
display
'
)
return
$localize
`Displayed`
}
buildRegistrationLabel
()
{
const
config
=
this
.
serverConfig
.
signup
if
(
config
.
allowed
!==
true
)
return
$localize
`Disabled`
if
(
config
.
requiresApproval
===
true
)
return
$localize
`Requires approval by moderators`
return
$localize
`Enabled`
}
getServerVersionAndCommit
()
{
return
this
.
serverService
.
getServerVersionAndCommit
()
}
...
...
server/tests/helpers/version.ts
View file @
ff71e06a
...
...
@@ -21,11 +21,16 @@ describe('Version', function () {
expect
(
compareSemVer
(
'
3.4.0-alpha.1
'
,
'
3.4.0-beta.1
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-beta.1
'
,
'
3.4.0-beta.2
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-beta.1
'
,
'
3.5.0-alpha.1
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-alpha.1
'
,
'
3.4.0-nightly.4
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-nightly.3
'
,
'
3.4.0-nightly.4
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.3.0-nightly.5
'
,
'
3.4.0-nightly.4
'
)).
to
.
be
.
below
(
0
)
})
it
(
'
Should correctly compare a stable and unstable versions
'
,
async
function
()
{
expect
(
compareSemVer
(
'
3.4.0
'
,
'
3.4.1-beta.1
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-beta.1
'
,
'
3.4.0-beta.2
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-beta.1
'
,
'
3.4.0
'
)).
to
.
be
.
below
(
0
)
expect
(
compareSemVer
(
'
3.4.0-nightly.4
'
,
'
3.4.0
'
)).
to
.
be
.
below
(
0
)
})
})
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment