git://git.onelab.eu
/
plstackapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bugs
[plstackapi.git]
/
plstackapi
/
core
/
models
/
site.py
diff --git
a/plstackapi/core/models/site.py
b/plstackapi/core/models/site.py
index
b15e35b
..
76cc0a4
100644
(file)
--- a/
plstackapi/core/models/site.py
+++ b/
plstackapi/core/models/site.py
@@
-26,6
+26,9
@@
class Site(PlCoreBase):
description=self.name,
enabled=self.enabled)
self.tenant_id = tenant.id
description=self.name,
enabled=self.enabled)
self.tenant_id = tenant.id
+ # give caller an admin role at the tenant they've created
+ self.driver.add_user_role(self.caller.user_id, tenant.id, 'admin')
+
# update the record
if self.id:
self.driver.update_tenant(self.tenant_id,
# update the record
if self.id:
self.driver.update_tenant(self.tenant_id,