Skip to main content
.NET Framework 4.5.2+

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.v24.1.dll

Declaration

public HashSet<string> NonSecureActions { get; }

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