All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

NonSecureActionsInitializingEventArgs.NonSecureActions Property

Contains Actions that the Security System ignores. You cannot manage them in the Denied Actions tab in the UI.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v20.1.dll

Declaration

public HashSet<string> NonSecureActions { get; }
Public ReadOnly Property NonSecureActions As HashSet(Of String)

Property Value

Type Description
HashSet<String>

A collection of Actions that the Security System ignores.

Remarks

The Security System marks built-in Actions as non-secure and hides them in the Denied Actions tab. The NonSecureActionsInitializing event allows you to customize a list of non-secure Actions. Add custom or remove system Action identifiers from the NonSecureActions collection to manage whether these Actions are available in the Denied Actions tab.

You can find an Action's identifier in the Model Editor:

To add a ChoiceActionItem to the NonSecureActions collection, use its complex identifier that includes dot-separated identifiers of all parent items. For example, the choiceActionItem from the following Controller has the "MySingleChoiceActionId.MyChoiceActionItemId" complex identifier.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
// ...
public class MyController : ViewController {
    // ...
    public MyController() {
        // ...
        SingleChoiceAction MySingleChoiceAction = new SingleChoiceAction(this, "MySingleChoiceActionId", null);
        ChoiceActionItem MyChoiceActionItem = new ChoiceActionItem("MyChoiceActionItemId", null)
        MySingleChoiceAction.Items.Add(MyChoiceActionItem);
    }
}

The following code shows how to add and remove Action identifiers from the NonSecureActions collection.

using DevExpress.ExpressApp.Security;
using DevExpress.ExpressApp.Win;
// ...
public partial class MySolutionWin : WinApplication {
    public MySolutionWin() {
        // ...
        securityModule1.NonSecureActionsInitializing += securityModule1_NonSecureActionsInitializing;
    }
    // ...
    private void securityModule1_NonSecureActionsInitializing(object sender, 
    NonSecureActionsInitializingEventArgs e) {
        // SimpleAction, PopupWindowShowAction, or ParametrizedAction 
        e.NonSecureActions.Add("Demo About Info");
        e.NonSecureActions.Remove("Export");
        // ChoiceActionItem
        e.NonSecureActions.Add("SetTaskAction.Priority"); 
    }
}
See Also