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

Show tasks only assigned to that person #2

Open
eyalabadi98 opened this issue Jul 9, 2018 · 4 comments
Open

Show tasks only assigned to that person #2

eyalabadi98 opened this issue Jul 9, 2018 · 4 comments

Comments

@eyalabadi98
Copy link

Hello,
I am wondering if anybody can give me some guidance into how to implement a way for non-admins to only see the tasks assigned to me.

Any help appreciated

@mrsarm
Copy link
Owner

mrsarm commented Jul 10, 2018

Yes @eyalabadi98 , I want to add a filter to the side bar of the Django list view time ago, with a label like "Assigned to me", but I didn't have time to write the code.

I added this post from Stackoverflow to my bookmarks, becuase I think this is the best way to solve it: https://stackoverflow.com/questions/12102697/creating-custom-filters-for-list-filter-in-django-admin/45136544#45136544

I you can do it, any PR would be appreciated.

@eyalabadi98
Copy link
Author

Hey,
I will definitely want to do it, but I don't want it to be optional. They can only see it it was assigned to me. Kind of my way of doing this is to create a permision first, then add a filter on the backend that only shows the column User.username if it matches the currently logged in user, and if they have the permission for global view, they can see everything.

I'll hopefully post an update soon

@mrsarm
Copy link
Owner

mrsarm commented Jul 10, 2018

OK, sounds good, maybe configurable through Django settings to be optional, or even set a name of a group where users are able to see any task not just admin user would be great!

@eyalabadi98
Copy link
Author

Yes, I got it working, but I created my own filter, so now the default filter sidebar doesnt work and I'm stuck on how to receive and display filters from settings.py. Hopefully I can figure it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants