This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Gevasys.DataCore.Client; | |
using Gevasys.DataCore.Core; | |
using Gevasys.DataCore.Core.Protocol; | |
using Gevasys.DataCore.Core.Protocol.Binary; | |
using Gevasys.DataCore.Core.Protocol.Binary.Decoding; | |
using Gevasys.DataCore.Tools.Protocol; | |
using Gevasys.DataCore.RequestData.ProtoBuf.V2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\d .importer | |
fetch_data:{[table_names;batch_size;data_date] | |
/ (1) Open remote connection | |
h::hopen `$":redacted:redacted:redacted"; | |
/ (2) Set arguments | |
tabs:enlist table_names; | |
bsize::batch_size; | |
dday::data_date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Authorization; | |
using System; | |
using System.Linq; | |
namespace CustomPolicyProvidersDemo.Authorization | |
{ | |
public static class Utility | |
{ | |
public static void Succeed(AuthorizationHandlerContext context, Guid identifier) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
H1 | H2 | HN | Result | |
---|---|---|---|---|
1 | N/A | N/A | Success | |
0 | 1 | N/A | Success | |
0 | 0 | 1 | Success | |
0 | 0 | 0 | Fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.Extensions.Options; | |
namespace CustomPolicyProvidersDemo.Authorization | |
{ | |
public class PermissionsPolicyProvider : IAuthorizationPolicyProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.AspNetCore.Authorization; | |
namespace CustomPolicyProvidersDemo.Authorization | |
{ | |
public interface IIdentifiable | |
{ | |
Guid Identifier { get; } | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
... | |
[Permissions(Permissions = new[] { "Read", "Write" }, | |
Roles = new[] { "Admin"})] | |
[HttpGet("{id}")] | |
public async Task<IActionResult> GetAsync(int id) | |
{ | |
... | |
} |
NewerOlder