mirror of https://github.com/Squidex/squidex.git
committed by
Sebastian Stehle
31 changed files with 348 additions and 142 deletions
@ -0,0 +1,24 @@ |
|||||
|
// ==========================================================================
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex UG (haftungsbeschr�nkt)
|
||||
|
// All rights reserved. Licensed under the MIT license.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
namespace Squidex.Domain.Apps.Core.Contents |
||||
|
{ |
||||
|
public sealed class NoUpdate : WorkflowCondition |
||||
|
{ |
||||
|
public static readonly NoUpdate Always = new NoUpdate(null, null); |
||||
|
|
||||
|
public NoUpdate(string expression, params string[] roles) |
||||
|
: base(expression, roles) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public static NoUpdate When(string expression, params string[] roles) |
||||
|
{ |
||||
|
return new NoUpdate(expression, roles); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
// ==========================================================================
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
||||
|
// All rights reserved. Licensed under the MIT license.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using System.Collections.ObjectModel; |
||||
|
using Squidex.Infrastructure.Collections; |
||||
|
|
||||
|
namespace Squidex.Domain.Apps.Core.Contents |
||||
|
{ |
||||
|
public abstract class WorkflowCondition |
||||
|
{ |
||||
|
public string Expression { get; } |
||||
|
|
||||
|
public ReadOnlyCollection<string> Roles { get; } |
||||
|
|
||||
|
protected WorkflowCondition(string expression, params string[] roles) |
||||
|
{ |
||||
|
Expression = expression; |
||||
|
|
||||
|
if (roles != null) |
||||
|
{ |
||||
|
Roles = ReadOnlyCollection.Create(roles); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue