On 18 November 2014 13:19, Martin Balmaceda <[email protected]>
wrote:

> Hi
>
> Is there a way to associate (webapp) users to a specific subset of the
> objects in the domain?
>
> For example let's say that you have Organizations in your domain and users
> should only be able to see and modify objects which belongs to the specific
> org they are associated with.
>
>
It sounds like you're talking about per-instance security...




> Is there any built-in functionality that provides something like this?
>
> ... in which case, no, but it's very easy to implement.

The example todo app actually demonstrates this.  Every todo item has an
"ownedBy" property [1], which is hidden but populated.

You can then use either hidden() [2] or disabled(IdentifierType) [3] so
that other users can either not see or can only view the object.

HTH
Dan


[1]
https://github.com/apache/isis/blob/b3e936c9aae28754fb46c2df52b1cb9b023f9ab8/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java#L293
[2]
https://github.com/apache/isis/blob/b3e936c9aae28754fb46c2df52b1cb9b023f9ab8/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java#L717
[3]
https://github.com/apache/isis/blob/b3e936c9aae28754fb46c2df52b1cb9b023f9ab8/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java#L726




> Regards
> Martin
>
> --
> to do is to be. dobedobedo
>

Reply via email to