Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network/local/mounts.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar_network/local/mounts.py')
-rw-r--r--sugar_network/local/mounts.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sugar_network/local/mounts.py b/sugar_network/local/mounts.py
index cfe9a1e..f5fad31 100644
--- a/sugar_network/local/mounts.py
+++ b/sugar_network/local/mounts.py
@@ -144,6 +144,14 @@ class HomeMount(LocalMount):
def name(self):
return _('Home')
+ @ad.directory_command(method='POST', cmd='create_with_guid',
+ permissions=ad.ACCESS_AUTH, mime_type='application/json')
+ def create_with_guid(self, request):
+ with self._post(request, ad.ACCESS_CREATE) as (directory, doc):
+ enforce('guid' in doc.props, 'GUID should be specified')
+ self.before_create(request, doc.props)
+ return directory.create(doc.props)
+
@ad.property_command(method='GET', cmd='get_blob',
mime_type='application/json')
def get_blob(self, document, guid, prop, request=None):