I'll do that

On 9/27/07, Richard Dahl <[EMAIL PROTECTED]> wrote:
>
> There is a row-level-permissions branch, but I do not believe it is
> actively being developed at this time.  I wrote my own role-based permission
> system and integrated it into all of my models that require it.  I have not
> attempted to integrate the permission system into the admin interface
> though.  I have used my own views.  If you just want to limit access to one
> user (+ admin) this can be accomplished relatively easily by storing  the
> user who created the model instance as a FK on the model.  The threadlocal
> middleware can be used to integrate this into your save method of your
> models, if this is required.  You could then create a model.manager to
> filter based on the request.user, and a model method that can evaluate
> whether or not the current user is authorized to edit or delete an
> instance.  My advice would be to check the permissions before every action,
> i.e. check as you create a queryset, when getting an instance for editing,
> when the edited instance is submitted to be saved, when an instance is to be
> deleted, etc...
> If you have any specific questions, I would be more than happy to answer
> what I can.
> -richard
>
>
>
>
> On 9/27/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote:
> >
> > hi people, I got a little question, how can I make some users add news
> > (model News), modify only news owned by him or even delete his news, not
> > others users news, but only admins can publish all of them?
> >
> > --
> > Lic. José M. Rodriguez Bacallao
> > Cupet
> > -----------------------------------------------------------------
> > Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
> > mismo.
> >
> > Recuerda: El arca de Noe fue construida por aficionados, el titanic por
> > profesionales
> > -----------------------------------------------------------------
> >
> >
>
> >
>


-- 
Lic. José M. Rodriguez Bacallao
Cupet
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic por
profesionales
-----------------------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to