Limiting access to data through user permissions?

2020-07-10 Thread Will Meyers
Just need some help getting over a wall I've hit. I have a web application that whenever a user signs up, is assigned a License. This License has CustomPermissions attached to it telling what values of a field within a materialized view they have access to. I have an API that needs to filter

User permissions

2018-11-17 Thread Joel Mathew
How are you implementing user permission groups in your project? I'm using a model to store user and other models as foreign key and permissions as boolean? Is there a preferred module or standard way to do this? Sincerely yours, Joel G Mathew -- You received this message because you are

How to save user permissions from custom user edit form

2017-11-04 Thread DJ-Tom
Hi, I have created the following user form for my custom user model: class UsersForm(ModelForm): class Meta: model = UserAccount fields = ('is_active', 'is_superuser', 'is_templog', 'is_crewreg', 'is_spaceman','first_name', 'last_name', 'company',

Re: logged in user permissions and roles caching

2016-01-21 Thread James Schneider
On Wed, Jan 20, 2016 at 10:06 PM, Eddilbert Macharia wrote: > Hello guys I'm a little bit confused... . When using django all that > is, permissions and roles He is my understanding of how django > works. On each request made my by a client django creates a

logged in user permissions and roles caching

2016-01-20 Thread Eddilbert Macharia
Hello guys I'm a little bit confused... . When using django all that is, permissions and roles He is my understanding of how django works. On each request made my by a client django creates a request object from it And by using the authentication middleware it adds the logged

Re: User Permissions

2013-08-01 Thread Carlos Leite
On Wed, Jul 31, 2013 at 2:01 AM, Jani Tiainen wrote: > On Tue, 30 Jul 2013 16:39:27 -0300 > Carlos Leite wrote: > >> Django do not have a "per-row" permission system in the box. >> You will have to create that by yourself. > > That is slightly incorrect -

Re: User Permissions

2013-07-30 Thread Jani Tiainen
On Tue, 30 Jul 2013 16:39:27 -0300 Carlos Leite wrote: > Django do not have a "per-row" permission system in the box. > You will have to create that by yourself. That is slightly incorrect - Django _does_ have foundation for object (row) level permission system. There is

Re: User Permissions

2013-07-30 Thread John DeRosa
Take a look at django-guardian. (http://pythonhosted.org/django-guardian/) John On Jul 30, 2013, at 12:39 PM, Carlos Leite wrote: > Django do not have a "per-row" permission system in the box. > You will have to create that by yourself. > > You may start adding something

Re: User Permissions

2013-07-30 Thread Carlos Leite
Django do not have a "per-row" permission system in the box. You will have to create that by yourself. You may start adding something like "owner" to your content type. this field will be somthing like owner = models.ForeignKey(User) then, based on "request.user" in your views (for instance),

User Permissions

2013-07-30 Thread ghinfey
Hi All, I have a very simple django site. The site allows the administrator to create a model which contains 5 text items and then stores that to the sqlite database. I have also created a user login page from a tutorial on youtube. I want to be able to control which model the logged in user has

Add chosen user Permission in User table from Avaliable user Permissions by writing code

2012-12-06 Thread Nikhil Verma
Hi All I am in User Table from django auth and in the admin i am in change_forms page . I can clearly see that there is ManyToMany relationship field called user_permission. In user_permission filed we have choosen user permssion in which we choosen permission gets saved. However i want to set

Re: Django User Permissions

2011-02-15 Thread David De La Harpe Golden
On 15/02/11 17:31, hank23 wrote: > So my question is what type of object is returned by user.user_permissions? First, N.B. you probably want to look at user.get_all_permissions(). user_permissions in particular doesn't represent all permissions a user "has" in the django.contrib.auth system, only

Django User Permissions

2011-02-15 Thread hank23
I'm trying to get used to working with django's user authentication framework and want to display the permissions for a user I've created. When I try to display the the permissions that I get back from user.user_permissions I had assumed that something like a list would be returned and be

Multiple Select Option Widget Like User Permissions in Admin

2011-01-13 Thread Bob Hancock
I've searched Django Snippets and I've started to debug how the Admin interface does it, but is there an existing widget that displays a list of choices in a left box and allows you to move them to a right box with a click like the selection of User Permissions in the Admin or the jQuery

Re: auth user permissions

2010-11-19 Thread MikeKJ
gt;> server but the add/change/delete permission set is not showing in the >> auth-user add permission set, what is it I have forgotten please? >> -- >> View this message in >> context:http://old.nabble.com/auth-user-permissions-tp30257316p30257316.html >> Sent fr

Re: auth user permissions

2010-11-19 Thread lukaszb
add permission set, what is it I have forgotten please? > -- > View this message in > context:http://old.nabble.com/auth-user-permissions-tp30257316p30257316.html > Sent from the django-users mailing list archive at Nabble.com. -- You received this message because you are subscribe

auth user permissions

2010-11-19 Thread MikeKJ
I have forgotten something here, added a model to a site, restarted the server but the add/change/delete permission set is not showing in the auth-user add permission set, what is it I have forgotten please? -- View this message in context: http://old.nabble.com/auth-user-permissions

Inlines user permissions problem + view only permissions

2010-05-18 Thread Vali Lungu
Hello, I'm not sure if this is a bug or I'm just missing something (although I have already parsed the documentation about inlines), but: Let's say I have a model A. Model A is an inline of model B. User U has full access to model B, but only change permissions to model A (so, no add, nor

Re: User permissions to see a view

2010-02-19 Thread ALJ
I am restricting access to particular pages. The reports page doesn't have a particular model. It's going to have some 'flat' content and links to lots of other reports. So that is why I was confused. There is no underlying data model for that page. I was going to query rebus's suggestion. I

Re: User permissions to see a view

2010-02-18 Thread rebus_
On 18 February 2010 14:02, Alexey Kostyuk wrote: > Hi ALJ! > > Why can not you add a model 'reports' (in your example) and add the > required permissions? > Also you can add custom permissions[1] to any other models of your app > and use them. > >

Re: User permissions to see a view

2010-02-18 Thread Alexey Kostyuk
Hi ALJ! Why can not you add a model 'reports' (in your example) and add the required permissions? Also you can add custom permissions[1] to any other models of your app and use them. [1]http://docs.djangoproject.com/en/dev/topics/auth/#id2 On Thu, 2010-02-18 at 04:29 -0800, ALJ wrote: > Hi

Re: User permissions to see a view

2010-02-18 Thread ALJ
Hi Rebus, Yeah, I got that, but where do I put the meta permissions? In which model? The user? > #models.py class UserType(models.Model): id = models.CharField(max_length=3, primary_key=True) name = models.CharField(max_length=30)

Re: User permissions to see a view

2010-02-18 Thread rebus_
On 18 February 2010 13:29, ALJ wrote: > Hi Alexey, > > But how do you set a permission for a view? There's no underlying > model to which to add the custom meta permissions. > > ALJ > > On Feb 18, 12:48 pm, Alexey Kostyuk wrote: >> On Thu,

Re: User permissions to see a view

2010-02-18 Thread ALJ
Hi Alexey, But how do you set a permission for a view? There's no underlying model to which to add the custom meta permissions. ALJ On Feb 18, 12:48 pm, Alexey Kostyuk wrote: > On Thu, 2010-02-18 at 02:30 -0800, ALJ wrote: > > First project and struggling a bit. > > > I

Re: User permissions to see a view

2010-02-18 Thread Alexey Kostyuk
On Thu, 2010-02-18 at 02:30 -0800, ALJ wrote: > First project and struggling a bit. > > I have some views that I want to restrict access to, depending on user > type. How do I do that? > > For example, I have a 'reports' view that I only want teachers to > see ... not students. I can't see how

User permissions to see a view

2010-02-18 Thread ALJ
First project and struggling a bit. I have some views that I want to restrict access to, depending on user type. How do I do that? For example, I have a 'reports' view that I only want teachers to see ... not students. I can't see how to create a custom permission because there is no underlying

user permissions of request in template

2010-01-26 Thread mendes.rich...@gmail.com
Hello Django Users, I'm currently working on a part of the admin portal for a django application. This specific part of the admin page should only be available to one guy and the superusers. in order to do this i thought to add a special permission in the permission model which i can add to

Re: Row-specific user permissions

2009-07-19 Thread nkulmati
ed an update on the > > following question. > > > Has anyone found a generic solution to django-admin's huge flaw - > > specifically, not being able to limit view/edit/delete activities > > based on object-specific (not model-specific) characteristics and user > > permi

Re: Row-specific user permissions

2009-07-18 Thread Alex Gaynor
cally, not being able to limit view/edit/delete activities > based on object-specific (not model-specific) characteristics and user > permissions? > (For example. limiting what *instances* a user can see/edit/delete to > only those he has created.) > > Or do I still h

Row-specific user permissions

2009-07-18 Thread nkulmati
) characteristics and user permissions? (For example. limiting what *instances* a user can see/edit/delete to only those he has created.) Or do I still have to reinvent the whole admin application just to incorporate the feature? (Which, by the way, is a must for any collaborative online publication.) Thanks

Re: "available user permissions" list incomplete

2008-11-23 Thread Malcolm Tredinnick
On Sun, 2008-11-23 at 22:22 -0800, sajal wrote: > thanks a lot.. that fixed it. > > Even after making the mess that i made, a syncdb solved the issue > keeping all my other data intact. > > I however have a related question. > > While modifying the existing classes, i.e. adding fields, i do

Re: "available user permissions" list incomplete

2008-11-23 Thread sajal
thanks a lot.. that fixed it. Even after making the mess that i made, a syncdb solved the issue keeping all my other data intact. I however have a related question. While modifying the existing classes, i.e. adding fields, i do the "ALTER TABLE" by hand as suggested by

Re: "available user permissions" list incomplete

2008-11-23 Thread Malcolm Tredinnick
On Sun, 2008-11-23 at 21:47 -0800, sajal wrote: > Apologies for the lack of details, didnt really know what details to > provide. > > Here is what I did. Good step-by-step accounting of what you did. Makes it easy to spot where the problem is. > 2 users (one superadmin and one regular user) >

Re: "available user permissions" list incomplete

2008-11-23 Thread sajal
ce. modify the existing models - and accordingly run "ALTER TABLE" commands in pgsql Add 2 new classes , paste the create table queries generated by sqlall into pgsql Now, superuser has access to all the new classes which work fine, however the "Available user permissions" in the

Re: "available user permissions" list incomplete

2008-11-23 Thread Malcolm Tredinnick
On Sun, 2008-11-23 at 20:47 -0800, sajal wrote: > +1 > > Having exactly the same issue. Last night i was busy adding classes > and stuff, after uploading to the dev server, im unable to add > permissions to a "staff" user since the new class isint in the list. > > me (superuser) can see it

Re: "available user permissions" list incomplete

2008-11-23 Thread sajal
uperuser until i can find a fix. Python : 2.5.2 >>> django.VERSION (1, 0, 'final') using postgresql for the database. On Nov 15, 2:43 am, Alex Chun <[EMAIL PROTECTED]> wrote: > I need to give permission to an admin user to add/edit a class, but > that class does not appear

"available user permissions" list incomplete

2008-11-14 Thread Alex Chun
I need to give permission to an admin user to add/edit a class, but that class does not appear on the "available user permissions" list. The class is listed automatically for superusers, so it appears to be registered correctly with the admin. But I can't make that class available

Setting user permissions per object

2008-11-11 Thread finn
According to the documentation, Django does not at this point support per-object permission setting. You can set a users' permissions for a model class, but not for individual instances of that model. Are there any code examples concerning how one might work around this? A practical example

Re: Changing the returned query set in the admin interface 'add' section depending on user permissions.

2008-08-20 Thread chewynougat
Thanks John, A combination of overriding django's built in functions and some jiggery pokery has got me most of the way there. I shall continue. On Aug 19, 2:23 pm, John M <[EMAIL PROTECTED]> wrote: > I suspect you'll have to intercept one of the many signals django has > in it's architecture.  

Re: Changing the returned query set in the admin interface 'add' section depending on user permissions.

2008-08-19 Thread John M
I suspect you'll have to intercept one of the many signals django has in it's architecture. Sorry, not sure where to point you other than that. John On Aug 19, 4:19 am, chewynougat <[EMAIL PROTECTED]> wrote: > Hi, > > I have an admin add form that allows users to insert documents. I have > a

Changing the returned query set in the admin interface 'add' section depending on user permissions.

2008-08-19 Thread chewynougat
Hi, I have an admin add form that allows users to insert documents. I have a select box which currently displays all company departments and their relevant categories (e.g. finance and admin -> payroll, finance and admin -> expenses etc). What I would like to do is display the relevant

Re: User permissions

2008-02-07 Thread Erwin Elling
> Probably, but I always include that in the time scale just in case. > You know how tricky it is to estimate software development. I understand; nevertheless your estimates are highly appreciated. Hopefully Jacob is right about it being closer to now... :) Untill that time, I guess I'll just

Re: User permissions

2008-02-06 Thread James Bennett
On Feb 6, 2008 4:38 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > ... though given the choices, I'd be inclined to wager that it's > closer to "now" than to "the heat death of the universe"... Probably, but I always include that in the time scale just in case. You know how tricky it is to

Re: User permissions

2008-02-06 Thread Jacob Kaplan-Moss
On 2/6/08, James Bennett <[EMAIL PROTECTED]> wrote: > Some amount of time between "now" and "the heat death of the > universe". There is no estimate, no timeline, no schedule, no ETA, no > guess, nor any other synonym of any of those words. ... though given the choices, I'd be inclined to wager

Re: User permissions

2008-02-06 Thread James Bennett
On Feb 6, 2008 11:57 AM, Erwin <[EMAIL PROTECTED]> wrote: > That sounds quite interesting, but I'm not totally sure what you are > referring to. Do you mean the hooks the newforms admin branch provides > or maybe the possibilities of the row-level permissions branch? newforms-admin.

Re: User permissions

2008-02-06 Thread Erwin
> In the admin it's basically not possible right now, but will become > very easy in the not-too-distant future. That sounds quite interesting, but I'm not totally sure what you are referring to. Do you mean the hooks the newforms admin branch provides or maybe the possibilities of the row-level

Re: User permissions

2008-01-31 Thread James Bennett
On Jan 31, 2008 5:06 PM, Chris <[EMAIL PROTECTED]> wrote: > I've been reading up on user permissions and I have found that user > permissions are on a per-model basis. My question: If I have a photo > gallery application, and I have several uses who can post their > galleries t

Re: User permissions

2008-01-31 Thread Alex Koshelev
No, just now django doesn't support row level permissions. Look at this branch http://code.djangoproject.com/wiki/RowLevelPermissions On 1 фев, 02:06, Chris <[EMAIL PROTECTED]> wrote: > I've been reading up on user permissions and I have found that user > permissions are on a per-mod

Re: User permissions

2008-01-31 Thread Michael Elsdörfer
> gallery application, and I have several uses who can post their > galleries to this application. Is there a way to create permission on > a per-user basis. There apparently was some work on a per-object permissions branch in the past, but it looks pretty dead:

User permissions

2008-01-31 Thread Chris
I've been reading up on user permissions and I have found that user permissions are on a per-model basis. My question: If I have a photo gallery application, and I have several uses who can post their galleries to this application. Is there a way to create permission on a per-user basis. Example

Re: widget looks like user permissions management?

2007-12-26 Thread supafly
Sorry, all this regulated by filter_interface=models.HORIZONTAL in model definition. e.g.: field = models.ManyToManyField(Link, filter_interface=models.HORIZONTAL) On 26 дек, 11:11, supafly <[EMAIL PROTECTED]> wrote: > Is there simple way to render many-to-many/one-to-many relationship > such

widget looks like user permissions management?

2007-12-26 Thread supafly
Is there simple way to render many-to-many/one-to-many relationship such as permissions box in django admin interface? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

How do you set user permissions in test data?

2007-08-03 Thread Todd O'Bryan
I've been using fixtures to create test data, but how do I set user permissions that aren't brittle? If I use ./manage.py dumpdata it dumps the user_permissions as a list of ids of permissions the user has. The problem is, as I add more apps/permissions to my project, those ids are likely