[jdev] data forms with different access models

Goffi goffi at goffi.org
Thu Mar 2 07:12:05 UTC 2017


Hello,


I would like to have a dataform in a pubsub item with different access models 
for the fields, for instance a "body" field would be public while a "email" 
field would be only accessible to a white list of jid.

I think of 2 ways of achieving that with a standard PubSub service:

	- having an intermediate service which open a private node on the pubsub 
service, and which know how to handle the fields and permissions.
	PROS: simple design
	CONS: needs an extra layer, not generic

	- having a way to "compose" data form in several nodes. The main node/item 
would be a list of nodes with different access  models (first node is white 
list, second is open), the client try all nodes an gather the data it can 
access to compose a final form.
	PROS: working with current pubsub services, generic, we have fields history 
for free
	CONS: more complicated design, difficult to search items, more requests


Maybe there is an other way I haven't thought about.


What do you think is the best way? Do you have better idea?



Thanks

Goffi


More information about the JDev mailing list