def user_has_perm_app(user, obj):
 has_perm = False
 if (obj.__class__ == Webapp):
  has_perm = (user.addons.filter(pk=obj.id).exists() or (user.email in obj.get_mozilla_contacts()))
 elif (obj.__class__ == Extension):
  has_perm = user.extension_set.filter(pk=obj.id).exists()
 return (has_perm or check_acls(user, None, 'reviewer') or check_acls(user, None, 'senior_reviewer') or check_acls(user, None, 'admin'))

def user_has_perm_app ( user , obj ) : has_perm = False if ( obj . __class__ == Webapp ) : has_perm = ( user . addons . filter ( pk = obj . id ) . exists ( ) or ( user . email in obj . get_mozilla_contacts ( ) ) ) elif ( obj . __class__ == Extension ) : has_perm = user . extension_set . filter ( pk = obj . id ) . exists ( ) return ( has_perm or check_acls ( user , None , 'reviewer' ) or check_acls ( user , None , 'senior_reviewer' ) or check_acls ( user , None , 'admin' ) )
its named app for historical reasons .