[Bug?] ReadabilityGate does not seem to work

3 posts / 0 new
Last post
Marc
Offline
Joined: 07/08/2009
[Bug?] ReadabilityGate does not seem to work

Hello,

I'm quite into gates for the moment...

I tried to use readabilitygates, just as I used writabilitygates (same Spring structure), on an entity as well as on a view. But the readabilitygate does not seem to provoke any effect: ungrated roles still see the entity respectively the view. Also the booleanPropertyModel does not hide/visualize the items.

I found out about readability gates while cruising through the code, and I was just wandering if it offers the same power as writabiligates.

I attach a simple example with only roles. When I log in with another role than "ProductManager", the user still sees the entity "Product".

PS: not urgent.

Thanks,

Marc

AttachmentSize
model.xml4.8 KB
Edited by Marc on 10/16/2009 - 08:49
vvandens
Offline
Joined: 05/29/2008
ReadabilityGates...

Marc,

I have a problem regarding readability gates. I've never used them that much (in fact, I've only duplicated the implementation of writability gates) and I even wonder if this is something valuable. Regarding the design of such a feature, there are many open questions as well as some conceptual problems, such as :

  • what happens when a readability gate is defined on a property and this property is bound to a table column ? Some rows may have the readability gate open and some other not...
  • what does it mean to have a property (or an entity) writable but not readable ?
  • ...

After some more thinking, I think we should get rid of this concept in the codebase. All the problems above are linked to the dynamic nature of gates. Granted roles, which is a static concept, seems to be sufficient to handle readability permissions.

 

Do you have another opinion ?

 

Best,

Vincent

Marc
Offline
Joined: 07/08/2009
Vincent, I agree. Static

Vincent,

I agree. Static readability should suffice.

Regards,

Marc