diff --git a/RMuseum/Controllers/AppUserController.cs b/RMuseum/Controllers/AppUserController.cs
index 6eac578f..5f108903 100644
--- a/RMuseum/Controllers/AppUserController.cs
+++ b/RMuseum/Controllers/AppUserController.cs
@@ -186,15 +186,6 @@ namespace RMuseum.Controllers
return content;
}
- ///
- /// Is Sign-up enabled?
- ///
- ///
- protected override bool IsSignupEnabled()
- {
- return true;
- }
-
}
}
diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml
index 573343dd..e8daf1e4 100644
--- a/RMuseum/RMuseum.xml
+++ b/RMuseum/RMuseum.xml
@@ -55,12 +55,6 @@
html content
-
-
- Is Sign-up enabled?
-
-
-
get all published artifacts (including CoverImage info but not items info)
diff --git a/RMuseum/appsettings.json b/RMuseum/appsettings.json
index 08044080..0510f5bf 100644
--- a/RMuseum/appsettings.json
+++ b/RMuseum/appsettings.json
@@ -58,10 +58,14 @@
"RootPath": "/home"
},
"AudioUploadService": {
- "Enabled": "True",
+ "Enabled": "True",
"TempUploadPath": "C:\\tempaudio",
"LocalAudioRepositoryPath": "D:\\My Documents\\My Web Design\\ganjoor\\www\\i",
"CurrentSoundFilesFolder": "a2"
},
+ "SignUp": {
+ "Enabled": "True",
+ "VerifyEmail": "True"
+ },
"AllowedHosts": "*"
}
diff --git a/RSecurityBackend/Controllers/AppUserControllerBase.cs b/RSecurityBackend/Controllers/AppUserControllerBase.cs
index 098840e8..5ce6f09e 100644
--- a/RSecurityBackend/Controllers/AppUserControllerBase.cs
+++ b/RSecurityBackend/Controllers/AppUserControllerBase.cs
@@ -808,7 +808,7 @@ namespace RSecurityBackend.Controllers
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
public async Task SignUp([FromBody] UnverifiedSignUpViewModel signUpViewModel)
{
- if (!IsSignupEnabled())
+ if (!SignupEnabled)
return BadRequest("ثبت نام غیرفعال است.");
RServiceResult captchaRes = await _captchaService.Evaluate(signUpViewModel.CaptchaImageId, signUpViewModel.CaptchaValue);
@@ -988,9 +988,12 @@ namespace RSecurityBackend.Controllers
/// Is Sign-up enabled?
///
///
- protected virtual bool IsSignupEnabled()
+ public bool SignupEnabled
{
- return false;
+ get
+ {
+ return bool.Parse(Configuration.GetSection("SignUp")["Enabled"]);
+ }
}
///
diff --git a/RSecurityBackend/RSecurityBackend.xml b/RSecurityBackend/RSecurityBackend.xml
index 596744f0..bd1cb425 100644
--- a/RSecurityBackend/RSecurityBackend.xml
+++ b/RSecurityBackend/RSecurityBackend.xml
@@ -269,7 +269,7 @@
html content
-
+
Is Sign-up enabled?