martijnboland / apptext

AppText is a content management system for applications. Application developers can use it to replace static resources in applications with dynamic content and delegate content management to non-developers.
https://apptext.io
Apache License 2.0
23 stars 5 forks source link

Bug with require authentication role #42

Closed vallieresch closed 3 years ago

vallieresch commented 3 years ago

In our app a user can have multiple roles and to support this I add multiple role claims and it works with the .net [Authorize] attribute. When adding required authentication to AppText I was getting a 500 error. I looked into it and it seems like AppText only supports 1 role claim.

Would it be possible for you to add support for multiple role claims like the [Authorize] attribute does?

vallieresch commented 3 years ago

@martijnboland Any news on this issue? Will this be supported?

martijnboland commented 3 years ago

Totally missed this issue. Yes, I think multiple role claims should just work, so I consider this a bug.

Unfortunately, I'm pretty swamped with work these days and I can not find any time soon to fix this. Is there a possibility that you give it a try to implement this yourself and submit a Pull Request?

vallieresch commented 3 years ago

Ok I'll try and get that fixed

martijnboland commented 3 years ago

Thanks for the PR. I just merged it and it works. However, I did try the HostAppExample after the merge and that fails because it can not (de)serialize the claims collection due to some circular reference issue with Newtonsoft.Json. Can you verify that this is also the case on your side?

vallieresc commented 3 years ago

I was never able to run the host app. I'm getting an error for the file provider: AppText.AdminApp.Configuration.EmbeddedStaticFilesOptions.PostConfigure(string name, StaticFileOptions options) in EmbeddedStaticFilesOptions.cs var filesProvider = new ManifestEmbeddedFileProvider(GetType().Assembly, "wwwroot");

martijnboland commented 3 years ago

Alright I'll see if I can fix it and create a new release.

martijnboland commented 3 years ago

Fixed in release v0.5.4