Commit 2f2bad88 authored by Gero Müller's avatar Gero Müller
Browse files

fix controller get("fs")

parent 9d3bd8b4
......@@ -2,10 +2,9 @@
# imports
import vispa
from vispa import models, filesystem
from vispa import models
import cherrypy
class StaticController(object):
def __init__(self, path):
......@@ -68,7 +67,7 @@ class AbstractController(object):
workspace_id = None
if len(args) > 0:
workspace_id = args[0]
return self.get_fs(workspace_id=workspace_id)
return vispa.rpc.get(cherrypy.request.user, workspace_id, 'vispa.remote.filesystem.FileSystem')
return None
return None
......@@ -115,14 +114,3 @@ class AbstractController(object):
raise Exception('TypeError: conversion to float received bad argument.')
# error case
raise Exception('TypeError: conversion with unknown type flag.')
def get_fs(self, workspace_id=None):
if not workspace_id and workspace_id != 0:
# try to get the workspace id from the session
if 'workspace_id' in cherrypy.session.keys():
workspace_id = cherrypy.session['workspace_id']
return None
# the workspace_id is set now
# TODO: use the ws plugin
return None
......@@ -3,10 +3,7 @@
# imports
import vispa
import cherrypy
import os, json, cStringIO
from vispa.models.user import User
from vispa.models.workspace import Workspace
from vispa.filesystem import FileSystem
import os, json
from vispa.controller import AbstractController
import xmlrpclib
......@@ -50,13 +47,6 @@ class FSController(AbstractController):
class FSAjaxController(AbstractController):
# overwrite self.get('fs') for testing reasons
def get(self, key, *args):
if key == 'fs':
return FileSystem()
return super(FSAjaxController, self).get(key, *args)
# -*- coding: utf-8 -*-
# Imports
import cherrypy
import os
import json
import sys
import traceback
import pkgutil
import importlib
import vispa
import vispa.extensions
from vispa.extensions import AbstractExtension
from vispa.models.workspace import Workspace
from vispa.filesystem import FileSystem
from vispa.helpers import browser
from vispa.models.user import User
from vispa.controller import StaticController
from vispa.controller.platform import PlatformController
from vispa.bus import Bus
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment