Skip to content

Commit 6f04263

Browse files
committed
template: minor conditional adjustments
1 parent 59c0b79 commit 6f04263

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Auth/Permission.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public enum Permission
1414

1515
[Display(Name = "Admin - Users", Description = "Add and modify users accounts and their assigned roles. Edit roles and their permissions.")]
1616
UserAdmin,
17-
17+
#if AuditLogs
1818
ViewAuditLogs
19+
#endif
1920
}

templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Pages/SignIn.cshtml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public class SignInModel(SignInManager<User> signInManager) : PageModel
2222
[BindProperty]
2323
[DataType(DataType.Password)]
2424
public required string Password { get; set; }
25-
#endif
2625

26+
#endif
2727
public void OnGet()
2828
{
2929
}
3030

31+
#if LocalAuth
3132
public async Task<IActionResult> OnPostAsync()
3233
{
33-
#if LocalAuth
3434
if (!ModelState.IsValid) return Page();
3535

3636
var result = await signInManager.PasswordSignInAsync(Username, Password, true, true);
@@ -40,8 +40,8 @@ public async Task<IActionResult> OnPostAsync()
4040
}
4141

4242
ModelState.AddModelError(string.Empty, result.IsLockedOut ? "Account locked out" : "Invalid login attempt.");
43-
#endif
4443

4544
return Page();
4645
}
46+
#endif
4747
}

0 commit comments

Comments
 (0)