#2618 - add backward compatibility for permissions optimizations
This commit is contained in:
@ -2,6 +2,7 @@ using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
@ -42,7 +43,7 @@ namespace Oqtane.Models
|
||||
#endregion
|
||||
|
||||
[NotMapped]
|
||||
public List<Permission> Permissions { get; set; }
|
||||
public List<Permission> PermissionList { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> Settings { get; set; }
|
||||
@ -107,5 +108,19 @@ namespace Oqtane.Models
|
||||
public bool UseAdminContainer { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
[Obsolete("The Permissions property is deprecated. Use PermissionList instead", false)]
|
||||
[NotMapped]
|
||||
public string Permissions
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonSerializer.Serialize(PermissionList);
|
||||
}
|
||||
set
|
||||
{
|
||||
PermissionList = JsonSerializer.Deserialize<List<Permission>>(Permissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user