public void Acl_RemoveRoles() { using (var httpTest = new HttpTest()) { var mds = new MarketDataService(_cfg); var auth = new AuthorizationPath.Input() { Path = "", Roles = new List <AuthorizationPrincipalRole>() { new AuthorizationPrincipalRole() { Role = "Role", InheritedFrom = "InheritedFrom", Principal = new Principal() { PrincipalId = "Id", PrincipalType = PrincipalType.User } } } }; mds.RemoveRoles(auth).ConfigureAwait(true).GetAwaiter().GetResult(); httpTest.ShouldHaveCalledPath($"{_cfg.BaseAddress}v2.1/acl/roles") .WithVerb(HttpMethod.Delete) .WithContentType("application/x.msgpacklz4") .WithHeadersTest() .Times(1); } }
/// <summary> /// Remove a role from the ACL Path /// </summary> /// <param name="remove">The entity we want to remove. At the path remove.Path we remove the remove.Roles</param> /// <param name="ctk">CancellationToken</param> /// <returns></returns> public Task RemoveRoles(AuthorizationPath.Input remove, CancellationToken ctk = default) { var url = "/acl/roles"; return(_client.Exec <AuthorizationPath.Input>(HttpMethod.Delete, url, remove)); }
/// <summary> /// Add a role to the ACL Path /// </summary> /// <param name="add">The entity we want to add. At the path add.Path we add the add.Roles</param> /// <param name="ctk">CancellationToken</param> /// <returns></returns> public Task AddRoles(AuthorizationPath.Input add, CancellationToken ctk = default) { var url = "/acl/roles"; return(_client.Exec <AuthorizationPath.Input>(HttpMethod.Post, url, add)); }
/// <summary> /// Upsert the ACL Path Roles /// </summary> /// <remarks> /// </remarks> /// <param name="upsert">The entity we want to upsert</param> /// <param name="ctk">CancellationToken</param> /// <returns></returns> public Task UpsertRoles(AuthorizationPath.Input upsert, CancellationToken ctk = default) { var url = "/acl"; return(_client.Exec <AuthorizationPath.Input>(HttpMethod.Post, url, upsert)); }
public Task RemoveRoles(AuthorizationPath.Input remove, CancellationToken ctk = default) { throw new NotImplementedException(); }
public Task UpsertRoles(AuthorizationPath.Input upsert, CancellationToken ctk = default) { throw new NotImplementedException(); }