You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Cesar Lugo <ce...@sisorg.com.mx> on 2015/11/04 22:55:45 UTC

Add tenancy programtically

 

Hello.

 

When using the security module add-on, I want a new tenancy to be created
automatically when a user inserts a new entity domain object, called
Business,, which has tenancy support, and then assign that newly created
tenancy to that Business object before persisting it. I would like to know
if there is a method I can call that creates a new tenancy, and then assign
the created tenancy to the newly created object (Business).

 

Cesar.



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Re: Add tenancy programtically

Posted by Óscar Bou - GOVERTIS <o....@govertis.com>.
Answered before by Dan in greater detail (and with the new domain service name).

So forget :)



> El 5 nov 2015, a las 0:07, Óscar Bou - GOVERTIS <o....@govertis.com> escribió:
> 
> 
> Hi again, Cesar.
> 
> You can use the ApplicationTenancies domain service.
> 
> It has a "newTenancy" action.
> 
> See [1].
> 
> HTH,
> 
> Oscar
> 
> [1] https://github.com/isisaddons/isis-module-security/blob/master/dom/src/main/java/org/isisaddons/module/security/dom/tenancy/ApplicationTenancies.java
> 
> 
>> El 4 nov 2015, a las 22:55, Cesar Lugo <ce...@sisorg.com.mx> escribió:
>> 
>> 
>> 
>> Hello.
>> 
>> 
>> 
>> When using the security module add-on, I want a new tenancy to be created
>> automatically when a user inserts a new entity domain object, called
>> Business,, which has tenancy support, and then assign that newly created
>> tenancy to that Business object before persisting it. I would like to know
>> if there is a method I can call that creates a new tenancy, and then assign
>> the created tenancy to the newly created object (Business).
>> 
>> 
>> 
>> Cesar.
>> 
>> 
>> 
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> https://www.avast.com/antivirus

Re: Add tenancy programtically

Posted by Óscar Bou - GOVERTIS <o....@govertis.com>.
Hi again, Cesar.

You can use the ApplicationTenancies domain service.

It has a "newTenancy" action.

See [1].

HTH,

Oscar

[1] https://github.com/isisaddons/isis-module-security/blob/master/dom/src/main/java/org/isisaddons/module/security/dom/tenancy/ApplicationTenancies.java


> El 4 nov 2015, a las 22:55, Cesar Lugo <ce...@sisorg.com.mx> escribió:
> 
> 
> 
> Hello.
> 
> 
> 
> When using the security module add-on, I want a new tenancy to be created
> automatically when a user inserts a new entity domain object, called
> Business,, which has tenancy support, and then assign that newly created
> tenancy to that Business object before persisting it. I would like to know
> if there is a method I can call that creates a new tenancy, and then assign
> the created tenancy to the newly created object (Business).
> 
> 
> 
> Cesar.
> 
> 
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus