Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "SperseDev"

Hi!

We have updated our project template to latest (ASP.NET Core & Angular v4.1.3), but have some problem with running unit tests.

We have found related issue #288 and fix

<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/288">https://github.com/aspnetzero/aspnet-ze ... issues/288</a> <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/commit/3eecf4758b79f020fb6950b4772b4b1efa6262ef">https://github.com/aspnetzero/aspnet-ze ... 1efa6262ef</a>

but it not fully resolve our issue. Now We receive another exception:

Message: System.NotSupportedException : SQLite does not support schemas. For more information, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=723262">http://go.microsoft.com/fwlink/?LinkId=723262</a>

Yes, We have db tables/entities with not default schema dbo.

Any ideas how to fix this?

Thanks

Hi,

I have simple data entity and appropriated dto entity

[Table("Packages", Schema = "Test")]
public class Package : FullAuditedEntity, IMustHaveTenant
{
	public int TenantId { get; set; }

	[Required]
	[MaxLength(50)]
	public string Name { get; set; }
}
[AutoMapFrom(typeof(Package))]
public class PackageDto : FullAuditedEntityDto
{
	public int TenantId { get; set; }

	public string Name { get; set; }
}

I have public (without authorization attribute) service:

public class PackageAppService : AppServiceBase, IPackageAppService
{
	private readonly IRepository<Package> _packageRepository;

	public PackageAppService(IRepository<Package> packageRepository)
	{
		_packageRepository = packageRepository;
	}

	public ListResultDto<PackageDto> GetAll()
	{
		var packages = _packageRepository.GetAll();

		return new ListResultDto<PackageDto>(ObjectMapper.Map<List<PackageDto>>(packages));
	}
}

When I call service method GetAll from host ( or public) context I receive list of all packages not filtered by tenantid null. When I use interface IMayHaveTenant instead of IMustHaveTenant all work correct. It's a bug?

Thanks.

Hi!

We have tried to integrate OData for project with 'ASP.NET Core & Angular 2+' template like described in the documentation: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/OData-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a>

When We added reference to Abp.Web.Api.OData package and specified depended module AbpWebApiODataModule to WebCoreModule (or WebHostModule) we have received exception on application startup:

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
	app.UseAbp(); <=EXCEPTION!
	...
}

Message: System.NullReferenceException: 'Object reference not set to an instance of an object.' Source: mscorlib StackTrace: at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str, Boolean onlyCheckExtras)

It is posible to integrate OData with ASP.NET Core? What we are doing wrong?

Thanks

Question

Hi, Could you suggest how to implement field level permissions using ASP.NET Boilerplate framework?

For example: I have entity Customer with fields Name, Address, Email. Some users should have permissions to read/modify Email field values.

I know how to check current user permission and how to show/hide appropriated fields on view. But what about service endpoint methods?

It would be great to have one place to specify these permissions, may be by attributes on entity's fields:

[ReadPermission("Customer.Email.Read")]
[ModifyPermission("Customer.Email.Write")]
public string Email {get; set; }

Then I need to have methods to control read/update permissions on field level:

  1. Method to get list of entity's fields to read/modify by current user permissions:
string[] fields = Customer.Metadata.GetReadFields(User.Permissions);
  1. Method to ignore fields on retrieving list of entities:
_customerRepository.GetAllIncluding("Name", "Address");
  1. Method to ignore mapping field values at runtime on creating/updating entity:
var customer = customerInput.MapTo<Customer>("Name", "Address");

Thanks in advance!

Showing 11 to 14 of 14 entries