Re: And again about permission to view

2015-07-14 Thread Григорий Крамаренко
Then lost the meaning: it is to give the ability to set custom permissions for all third-party applications whose code is "not available". четверг, 9 июля 2015 г., 21:02:08 UTC+10 пользователь Tim Graham написал: > > Historically there's been pushback against adding new settings. That said, > I

Re: And again about permission to view

2015-07-09 Thread Tim Graham
Historically there's been pushback against adding new settings. That said, I don't see an alternative here besides perhaps an AppConfig attribute (last discussed in https://groups.google.com/d/topic/django-developers/qnnCLppwA3o/discussion). Perhaps we should try to move the existing auth setti

Re: And again about permission to view

2015-07-08 Thread Григорий Крамаренко
I thought of something better: # Add to conf.global_settings.py ... CUSTOM_DEFAULT_PERMISSIONS = () ... # And add in db.models.options.py def get_full_default_permissions():

Re: And again about permission to view

2015-07-08 Thread Григорий Крамаренко
Another variant: # Add to conf.global_settings.py ... AUTH_DEFAULT_PERMISSIONS = ('add', 'change', 'delete') ... # And in db.models.options.py @python_2_unicode_compatible class Options(object): ... def __init__(self, meta, app_label=None): ... self.default_permissions

Re: And again about permission to view

2015-07-08 Thread Florian Apolloner
On Wednesday, July 8, 2015 at 6:37:39 AM UTC+2, Григорий Крамаренко wrote: > > "view" absolutly not affect to the admin panel, just as do not affect to > it other custom permissions. > Yes it does and you are completely ignoring the link I sent -- this would be the first one where not having a

Re: And again about permission to view

2015-07-07 Thread Marc Tamlyn
A general can_view permission not respected by the admin is not a good idea. However an easy way to add a general permission to every model in the system in one go would be interesting - a hook into https://github.com/django/django/blob/7da3923ba0c569aa23d0ab0a47a124af60a18f5b/django/contrib/auth/

Re: And again about permission to view

2015-07-07 Thread Григорий Крамаренко
Whether I don't understand you, or you me. Permissions in the admin work on the principle of: access = is_stuff and True in (add_perm, change_perm, delete_perm) "view" absolutly not affect to the admin panel, just as do not affect to it other custom permissions. Take a look at this permission a

Re: And again about permission to view

2015-07-07 Thread Florian Apolloner
On Tuesday, July 7, 2015 at 5:25:38 PM UTC+2, Григорий Крамаренко wrote: > > So, as I said at the beginning - this change does not affect the admin > panel. > It absolutely does, cause if you assign the "view" permission to a user he should be able to see the changelist, which wouldn't be the

Re: And again about permission to view

2015-07-07 Thread Григорий Крамаренко
I'm specifically tested with the admin panel. 1. while not included is_staff the user cannot log in admin panel 2. even if you include is_staff and all permissions to view, he still doesn't see anything until he does not has one from next permissions: add/change/delete. So, as I said at the begi

Re: And again about permission to view

2015-07-07 Thread Григорий Крамаренко
I look in the code admin.options.BaseModelAdmin.has_module_permission, who regulates access to the admin. Now any custom permission automatically makes read access to the admin area. So? среда, 8 июля 2015 г., 0:48:00 UTC+10 пользователь Григорий Крамаренко написал: > > Let's get into the admin

Re: And again about permission to view

2015-07-07 Thread Григорий Крамаренко
Let's get into the admin to check only three permissions in has_module_permissions. вторник, 7 июля 2015 г., 23:23:12 UTC+10 пользователь Tim Graham написал: > > Since the existing permissions are used in the admin, I don't think adding > a view permission that has no effect there would be very

Re: And again about permission to view

2015-07-07 Thread Tim Graham
Since the existing permissions are used in the admin, I don't think adding a view permission that has no effect there would be very intuitive. For projects that do want another permission such as "view" on all its models, I guess an easy way to do that could be useful. On Tuesday, July 7, 2015

Re: And again about permission to view

2015-07-07 Thread Florian Apolloner
On Tuesday, July 7, 2015 at 1:30:26 PM UTC+2, Григорий Крамаренко wrote: > > In fact, in versions 1.8 and 1.9 it is enough to simply add this > functionality without prejudice to existing and new projects. Simple patch >

And again about permission to view

2015-07-07 Thread Григорий Крамаренко
I understand that the topic was raised repeatedly. It's hard for me to read all the comments, because I badly know English. And I'm not going to talk about permission to view in the admin. I wrote the ticket , and Tim Graham forwarded me to this mail