Feature Request: allow toggling sharing for user/group on and off
See original GitHub issueHello!
I have custom User model, which inherits AbstractBaseUser and doesn’t have Group relation. So when i use filter mixin, i get this exception:
Traceback (most recent call last):
File "python2.7/site-packages/advanced_filters/admin.py", line 34, in lookups
return AdvancedFilter.objects.filter_by_user(request.user).filter(
File "python2.7/site-packages/advanced_filters/models.py", line 13, in filter_by_user
return self.filter(Q(users=user) | Q(groups__in=user.groups.all()))
File "python2.7/site-packages/django/utils/functional.py", line 235, in inner
return func(self._wrapped, *args)
AttributeError: 'User' object has no attribute 'groups'
Can you add a attribute checking in UserLookupManager.filter_by_user or something?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Feature: Manage Subnets left pane allow toggle "Groups" on and off ...
We use groups to organize subnets in logical groups. However, sometimes you are just looking for a subnet. A button that would toggle...
Read more >Windows 365 feature requests - Microsoft Tech Community
Windows 365 feature requests · Allow non-admins to restart their own Cloud PC from inside the OS · Option for Azure AD join...
Read more >Allow user to enable/disable instance level Shared Runners ...
The Enable shared runners for this group toggle switch will always be visible. The default value is for the switch to be in...
Read more >Feature Requests: Hot (424 ideas) – Horizon Worlds
Please develop a Keyboard Gizmo to allow us to give users the ability to enter text. This could be either a gizmo that...
Read more >New Feature Request for Board Permissions
For example, we have shared boards that a third party is using to feed us information, and I want my team members to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I created a PR for it. It was easy enough. I want to use this plugin maybe. I’ve been playing around with it. It’s quite nice, however a bit complex to use. Ok for developers but more complex for managers.
But I understand that it’s not easy to make a user-friendly UI in the Django admin. It’s not great but with a bit of modification and plugins it is just good enough to not make a custom admin yourself. At least it saves some work for as long as it suffices.
So thanks for the plugin. I hope this PR is will be accepted and that the plugin will be accessible to more people. Maybe I’ll do some more hacking on this some time.
Cheers
Yep that’s a good idea, and we should also allow toggling the sharing (and related filtering) for user/group in settings.
P.s: Pull requests are welcome 😄