check panel already exist
Signed-off-by: Ben Hall <ben@benh.codes>
This commit is contained in:
parent
214324d155
commit
276d1f47ca
@ -502,6 +502,7 @@ func ImportHandler(ctx *gin.Context) {
|
|||||||
panelCount := len(existingPanels)
|
panelCount := len(existingPanels)
|
||||||
|
|
||||||
for _, panel := range data.Panels {
|
for _, panel := range data.Panels {
|
||||||
|
if _, ok := panelIdMap[panel.PanelId]; ok {
|
||||||
if premiumTier < premium.Premium && panelCount > 2 {
|
if premiumTier < premium.Premium && panelCount > 2 {
|
||||||
panel.ForceDisabled = true
|
panel.ForceDisabled = true
|
||||||
panel.Disabled = true
|
panel.Disabled = true
|
||||||
@ -536,6 +537,7 @@ func ImportHandler(ctx *gin.Context) {
|
|||||||
|
|
||||||
panelCount++
|
panelCount++
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Import Panel Access Control Rules
|
// Import Panel Access Control Rules
|
||||||
for panelId, rules := range data.PanelAccessControlRules {
|
for panelId, rules := range data.PanelAccessControlRules {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user