diff --git a/GanjooRazor/Pages/Bp.cshtml.cs b/GanjooRazor/Pages/Bp.cshtml.cs
index 1ce7fbdf..0aff349f 100644
--- a/GanjooRazor/Pages/Bp.cshtml.cs
+++ b/GanjooRazor/Pages/Bp.cshtml.cs
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
+using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using RMuseum.Models.Ganjoor;
using RMuseum.Models.Ganjoor.ViewModels;
@@ -25,13 +26,20 @@ namespace GanjooRazor.Pages
///
private readonly HttpClient _httpClient;
+ ///
+ /// configuration
+ ///
+ private readonly IConfiguration Configuration;
+
///
/// constructor
///
///
- public BpModel(HttpClient httpClient)
+ ///
+ public BpModel(HttpClient httpClient, IConfiguration configuration)
{
_httpClient = httpClient;
+ Configuration = configuration;
}
///
@@ -60,6 +68,17 @@ namespace GanjooRazor.Pages
///
public int InsertedSongId { get; set; }
+ ///
+ /// readonly mode
+ ///
+ public bool ReadOnlyMode
+ {
+ get
+ {
+ return bool.Parse(Configuration["ReadOnlyMode"]);
+ }
+ }
+
///
/// suggested (unapproved) songs
///