Restore SEBPatch
This commit is contained in:
26
SafeExamBrowser.Settings/Browser/Filter/FilterResult.cs
Normal file
26
SafeExamBrowser.Settings/Browser/Filter/FilterResult.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.Settings.Browser.Filter
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all possible results of a request filter operation.
|
||||
/// </summary>
|
||||
public enum FilterResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that a request should be allowed if a filter matches.
|
||||
/// </summary>
|
||||
Allow,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that a request should be blocked if a filter matches.
|
||||
/// </summary>
|
||||
Block
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace SafeExamBrowser.Settings.Browser.Filter
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the settings for a request filter rule.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FilterRuleSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// The expression according to which requests should be filtered.
|
||||
/// </summary>
|
||||
public string Expression { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The filter result to be used when the <see cref="Expression"/> matches.
|
||||
/// </summary>
|
||||
public FilterResult Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The filter type which defines how the <see cref="Expression"/> is processed.
|
||||
/// </summary>
|
||||
public FilterRuleType Type { get; set; }
|
||||
}
|
||||
}
|
26
SafeExamBrowser.Settings/Browser/Filter/FilterRuleType.cs
Normal file
26
SafeExamBrowser.Settings/Browser/Filter/FilterRuleType.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.Settings.Browser.Filter
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all possible filter rule types.
|
||||
/// </summary>
|
||||
public enum FilterRuleType
|
||||
{
|
||||
/// <summary>
|
||||
/// The filter rule is based on a regular expression.
|
||||
/// </summary>
|
||||
Regex,
|
||||
|
||||
/// <summary>
|
||||
/// The filter rule is based on a simplified expression with wildcards.
|
||||
/// </summary>
|
||||
Simplified
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user