@jinja2.contextfunction
@library.global_function
def has_perm(context, perm, obj):
 return access.has_perm(context['request'].user, perm, obj)

@ jinja2 . contextfunction @ library . global_function def has_perm ( context , perm , obj ) : return access . has_perm ( context [ 'request' ] . user , perm , obj )
check if the user has a permission on a specific object .