﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29220	Auth: change user_passes_test func, new arg arg_position add	Oscar Lopez	nobody	"I had problems Add my decorations user_passes_test functions, because decorator _wrapped_view assume, the first arg is the `request` var parameter, when i call user_passes_test from a view into a class, that not work, it take the arg `self` look like a arg `request`

example:
`@user_passes_test(role_client_check)`
   `def index(self, request):`

Fatal error: Class don't have attribute user.

The next new change work for Django 1.11
but i see that Django 2.X file, doesn't change a lot

Now i can call the auth:
`@user_passes_test(role_client_check, arg_position=0)`
   `def index(self, request):`

`arg_position` can be specific when the first argument isn't ""request""
`arg_position` is a integer with the position of request on view function

I created my own user_passes_test function to solve this feature."	New feature	closed	contrib.auth	1.11	Normal	invalid	Auth, user_passes_test, decorator	oscarjoselopez26@… Oscar Lopez	Unreviewed	1	0	0	0	1	0
