def hr_search():
 group = get_vars.get('group', None)
 if (group == 'staff'):
  s3.filter = (FS('human_resource.type') == 1)
 elif (group == 'volunteer'):
  s3.filter = (FS('human_resource.type') == 2)
 s3.prep = (lambda r: (r.method == 'search_ac'))
 return s3_rest_controller('hrm', 'human_resource')

def hr_search ( ) : group = get_vars . get ( 'group' , None ) if ( group == 'staff' ) : s3 . filter = ( FS ( 'human_resource.type' ) == 1 ) elif ( group == 'volunteer' ) : s3 . filter = ( FS ( 'human_resource.type' ) == 2 ) s3 . prep = ( lambda r : ( r . method == 'search_ac' ) ) return s3_rest_controller ( 'hrm' , 'human_resource' )
human resource rest controller - limited to just search_ac for use in autocompletes - allows differential access permissions .