.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

PermissionSettingHelper.SetTypePermission Method

Name Parameters Description
SetTypePermission(IPermissionPolicyRole, Type, String, Nullable<SecurityPermissionState>) static role, targetType, operations, state

Searches for the first permission for the specified type in the current role, and rewrites its settings according to the specified parameters. If the type permission is not found, it is created.

SetTypePermission<T>(IPermissionPolicyRole, String, Nullable<SecurityPermissionState>) static role, operations, state

Searches for the first permission for the specified type in the current role, and rewrites its settings according to the specified parameters. If the type permission is not found, it is created.