Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to add custom data filters? #801

Closed
goxiaoy opened this issue Feb 13, 2019 · 5 comments
Closed

Is there any way to add custom data filters? #801

goxiaoy opened this issue Feb 13, 2019 · 5 comments
Labels

Comments

@goxiaoy
Copy link
Contributor

goxiaoy commented Feb 13, 2019

I am working on a CMS application and a website. All contents have a field called 'Status'. And the administrator can see contents marked as 'Previewed' on the website while normal users cannot. So I want to add a custom data filter which is enabled based on the role claim. Any ideas?

@hitaspdotnet
Copy link
Contributor

@goxiaoy ABP haven't any custom filter right now. For your case, you can use EF global query filtering for your special column(s) or create your own repository by following ABP Repositories Docs.

@goxiaoy
Copy link
Contributor Author

goxiaoy commented Feb 13, 2019

There are so many duplicate code to deal with ISoftDelete And IMultiTenant data filters 🤔🤔🤔.

@hikalkan
Copy link
Member

This might help you: https://aspnetboilerplate.com/Pages/Documents/Articles%5CHow-To%5Cadd-custom-data-filter-ef-core (it is similar for new framework too).

@goxiaoy
Copy link
Contributor Author

goxiaoy commented Feb 15, 2019

@hikalkan Thanks a lot!

@stale
Copy link

stale bot commented Jul 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Jul 29, 2020
@stale stale bot closed this as completed Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants