Moved IDiscoverable and Dashboards.*

This commit is contained in:
Lars-Erik Aabech
2019-05-20 17:05:04 +02:00
parent e19cfe575b
commit 9122bbdd45
8 changed files with 1 additions and 11 deletions

View File

@@ -1,14 +0,0 @@
namespace Umbraco.Core.Dashboards
{
/// <summary>
/// Implements <see cref="IAccessRule"/>.
/// </summary>
public class AccessRule : IAccessRule
{
/// <inheritdoc />
public AccessRuleType Type { get; set; }
/// <inheritdoc />
public string Value { get; set; }
}
}

View File

@@ -1,28 +0,0 @@
namespace Umbraco.Core.Dashboards
{
/// <summary>
/// Defines dashboard access rules type.
/// </summary>
public enum AccessRuleType
{
/// <summary>
/// Unknown (default value).
/// </summary>
Unknown = 0,
/// <summary>
/// Grant access to the dashboard if user belongs to the specified user group.
/// </summary>
Grant,
/// <summary>
/// Deny access to the dashboard if user belongs to the specified user group.
/// </summary>
Deny,
/// <summary>
/// Grant access to the dashboard if user has access to the specified section.
/// </summary>
GrantBySection
}
}

View File

@@ -1,12 +0,0 @@
using System.Runtime.Serialization;
namespace Umbraco.Core.Dashboards
{
[DataContract(IsReference = true)]
public class DashboardSlim : IDashboardSlim
{
public string Alias { get; set; }
public string View { get; set; }
}
}

View File

@@ -1,21 +0,0 @@
using Newtonsoft.Json;
using Umbraco.Core.Manifest;
namespace Umbraco.Core.Dashboards
{
/// <summary>
/// Represents an access rule.
/// </summary>
public interface IAccessRule
{
/// <summary>
/// Gets or sets the rule type.
/// </summary>
AccessRuleType Type { get; set; }
/// <summary>
/// Gets or sets the value for the rule.
/// </summary>
string Value { get; set; }
}
}

View File

@@ -1,38 +0,0 @@
using System.Runtime.Serialization;
using Umbraco.Core.Composing;
namespace Umbraco.Core.Dashboards
{
/// <summary>
/// Represents a dashboard.
/// </summary>
public interface IDashboard : IDashboardSlim, IDiscoverable
{
/// <summary>
/// Gets the aliases of sections/applications where this dashboard appears.
/// </summary>
/// <remarks>
/// <para>This field is *not* needed by the UI and therefore we want to exclude
/// it from serialization, but it is deserialized as part of the manifest,
/// therefore we cannot plainly ignore it.</para>
/// <para>So, it has to remain a data member, plus we use our special
/// JsonDontSerialize attribute (see attribute for more details).</para>
/// </remarks>
[DataMember(Name = "sections")]
string[] Sections { get; }
/// <summary>
/// Gets the access rule determining the visibility of the dashboard.
/// </summary>
/// <remarks>
/// <para>This field is *not* needed by the UI and therefore we want to exclude
/// it from serialization, but it is deserialized as part of the manifest,
/// therefore we cannot plainly ignore it.</para>
/// <para>So, it has to remain a data member, plus we use our special
/// JsonDontSerialize attribute (see attribute for more details).</para>
/// </remarks>
[DataMember(Name = "access")]
IAccessRule[] AccessRules { get; }
}
}

View File

@@ -1,22 +0,0 @@
using System.Runtime.Serialization;
namespace Umbraco.Core.Dashboards
{
/// <summary>
/// Represents a dashboard with only minimal data.
/// </summary>
public interface IDashboardSlim
{
/// <summary>
/// Gets the alias of the dashboard.
/// </summary>
[DataMember(Name = "alias")]
string Alias { get; }
/// <summary>
/// Gets the view used to render the dashboard.
/// </summary>
[DataMember(Name = "view")]
string View { get; }
}
}