diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.html b/client/src/app/shared/shared-instance/instance-features-table.component.html
index 6c05764df..205f2bc97 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.html
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.html
@@ -18,10 +18,9 @@
- User registration allowed |
-
-
- |
+ User registration |
+
+ {{ buildRegistrationLabel() }} |
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts
index e405c5790..c3df7c594 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.ts
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts
@@ -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()
}
diff --git a/server/tests/helpers/version.ts b/server/tests/helpers/version.ts
index 7d5600715..2a90efba3 100644
--- a/server/tests/helpers/version.ts
+++ b/server/tests/helpers/version.ts
@@ -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)
})
})