private static void SetPermission(AclEditor editor, int contentId, int identityId, bool localOnly, PermissionType permissionType, object permissionValue, List <string> messages) { switch (permissionValue.ToString().ToLowerInvariant()) { case "0": case "u": case "undefined": // PermissionValue.Undefined; editor.ClearPermission(contentId, identityId, localOnly, permissionType); break; case "1": case "a": case "allow": // PermissionValue.Allowed; editor.Allow(contentId, identityId, localOnly, permissionType); break; case "2": case "d": case "deny": // PermissionValue.Denied; editor.Deny(contentId, identityId, localOnly, permissionType); break; default: messages.Add($"WARING: Unknown permissionValue: {permissionValue}"); break; } }