set creator when creating slice in tenant view
diff --git a/planetstack/core/xoslib/methods/tenantview.py b/planetstack/core/xoslib/methods/tenantview.py
index 6c84b3e..d7460da 100644
--- a/planetstack/core/xoslib/methods/tenantview.py
+++ b/planetstack/core/xoslib/methods/tenantview.py
@@ -80,6 +80,7 @@
"current_user_site_users": [auser.id for auser in site_users],
"current_user_site_user_names": [auser.email for auser in site_users],
"current_user_can_create_slice": user.is_admin or ("pi" in user_site_roles) or ("admin" in user_site_roles),
+ "current_user_id": user.id,
}
class TenantList(APIView):
diff --git a/planetstack/core/xoslib/static/js/xosTenant.js b/planetstack/core/xoslib/static/js/xosTenant.js
index 9c45460..0ab8e81 100644
--- a/planetstack/core/xoslib/static/js/xosTenant.js
+++ b/planetstack/core/xoslib/static/js/xosTenant.js
@@ -183,11 +183,12 @@
}
model = new xos.slicesPlus.model({site: xos.tenant().current_user_site_id,
- name: xos.tenant().current_user_login_base + "_"});
+ name: xos.tenant().current_user_login_base + "_",
+ creator: xos.tenant().current_user_id});
console.log(model);
var detailView = new XOSTenantApp.tenantAddView({model: model,
- collection: xos.slicesPlus,
- noSubmitButton: true,
+ collection: xos.slicesPlus,
+ noSubmitButton: true,
});
detailView.dialog = $("#tenant-addslice-dialog");
app.tenantAddSliceInterior.show(detailView);