#115 reading signup active status from configurations
This commit is contained in:
parent
8e92211670
commit
54f0ae807c
@ -186,15 +186,6 @@ namespace RMuseum.Controllers
|
||||
return content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is Sign-up enabled?
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override bool IsSignupEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,12 +55,6 @@
|
||||
<param name="forgotPasswordCallbackUrl"></param>
|
||||
<returns>html content</returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.AppUserController.IsSignupEnabled">
|
||||
<summary>
|
||||
Is Sign-up enabled?
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.ArtifactController.Get(RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<summary>
|
||||
get all published artifacts (including CoverImage info but not items info)
|
||||
|
||||
@ -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": "*"
|
||||
}
|
||||
|
||||
@ -808,7 +808,7 @@ namespace RSecurityBackend.Controllers
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
public async Task<IActionResult> SignUp([FromBody] UnverifiedSignUpViewModel signUpViewModel)
|
||||
{
|
||||
if (!IsSignupEnabled())
|
||||
if (!SignupEnabled)
|
||||
return BadRequest("ثبت نام غیرفعال است.");
|
||||
|
||||
RServiceResult<bool> captchaRes = await _captchaService.Evaluate(signUpViewModel.CaptchaImageId, signUpViewModel.CaptchaValue);
|
||||
@ -988,9 +988,12 @@ namespace RSecurityBackend.Controllers
|
||||
/// Is Sign-up enabled?
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual bool IsSignupEnabled()
|
||||
public bool SignupEnabled
|
||||
{
|
||||
return false;
|
||||
get
|
||||
{
|
||||
return bool.Parse(Configuration.GetSection("SignUp")["Enabled"]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -269,7 +269,7 @@
|
||||
<param name="forgotPasswordCallbackUrl"></param>
|
||||
<returns>html content</returns>
|
||||
</member>
|
||||
<member name="M:RSecurityBackend.Controllers.AppUserControllerBase.IsSignupEnabled">
|
||||
<member name="P:RSecurityBackend.Controllers.AppUserControllerBase.SignupEnabled">
|
||||
<summary>
|
||||
Is Sign-up enabled?
|
||||
</summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user