@register.inclusion_tag('authority/permission_request_approve_link.html', takes_context=True)
def permission_request_approve_link(context, perm):
 user = context['request'].user
 if user.is_authenticated():
  if user.has_perm('authority.approve_permission_requests'):
   return base_link(context, perm, 'authority-approve-permission-request')
 return {'url': None}

@ register . inclusion_tag ( 'authority/permission_request_approve_link.html' , takes_context = True ) def permission_request_approve_link ( context , perm ) : user = context [ 'request' ] . user if user . is_authenticated ( ) : if user . has_perm ( 'authority.approve_permission_requests' ) : return base_link ( context , perm , 'authority-approve-permission-request' ) return { 'url' : None }
renders a html link to the approve view of the given permission request .