Thanks, it worked.
The final code
:
models.py
class BFlow(models.Model):
...
class Meta:
permissions = (("see_BFlow", "User can see BFlow in admin index page"),)
admin.py
class BFlowAdmin(admin.ModelAdmin):
def get_model_perms(self, request):
if request.user.has_perm('see_BFlow'):
return super(BFlowAdmin, self).get_model_perms(request)
return {}
And finally it worked :) Thanks
Sexta-feira, 10 de Outubro de 2014 18:53:29 UTC+1, Emanuel escreveu:
>
> Ok
> Thanks, I will try and post here the result later
>
>
> Sexta-feira, 10 de Outubro de 2014 18:45:46 UTC+1, Collin Anderson
> escreveu:
>>
>> Ohh, but it might still be possible to circumvent that hiding, so I'm not
>> sure.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/b0084b40-3ea4-438a-bf0d-7dfc85d6f3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.