check panel already exist

Signed-off-by: Ben Hall <ben@benh.codes>
This commit is contained in:
Ben Hall 2025-02-09 17:20:34 +00:00
parent 214324d155
commit 276d1f47ca

View File

@ -502,6 +502,7 @@ func ImportHandler(ctx *gin.Context) {
panelCount := len(existingPanels)
for _, panel := range data.Panels {
if _, ok := panelIdMap[panel.PanelId]; ok {
if premiumTier < premium.Premium && panelCount > 2 {
panel.ForceDisabled = true
panel.Disabled = true
@ -536,6 +537,7 @@ func ImportHandler(ctx *gin.Context) {
panelCount++
}
}
// Import Panel Access Control Rules
for panelId, rules := range data.PanelAccessControlRules {