public Task CreatePermissionAsync(PermissionInfo permissionInfo, CancellationToken cancellationToken = default(CancellationToken)) { Ensure.ArgumentNotNull(permissionInfo, nameof(permissionInfo)); return(PutAsync( $"permissions/{SanitiseVhostName(permissionInfo.GetVirtualHostName())}/{permissionInfo.GetUserName()}", permissionInfo, cancellationToken)); }
public void CreatePermission(PermissionInfo permissionInfo) { if (permissionInfo == null) { throw new ArgumentNullException("permissionInfo"); } Put(string.Format("permissions/{0}/{1}", permissionInfo.GetVirtualHostName(), permissionInfo.GetUserName()), permissionInfo); }
public void Should_return_the_correct_vhost_name() { permissionInfo.GetVirtualHostName().ShouldEqual(vhost.Name); }