kmmbvnr / oryx-editor

Automatically exported from code.google.com/p/oryx-editor
0 stars 0 forks source link

One user can obtaion multiple rights on a model which causes problems when trying to retrieve model information #350

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, I'm taking care of a big Oryx instance on which many users are 
working collaboratively. Thereby, Oryx' permissions management is used.

Two times in the past weeks, problems encountered when the repository 
overview page was trying to list models that a certain user could access:
The information of one or several models couldn't be obtained and as a 
result of this (e.g. in the table-mode) the whole list of models couldn't 
be displayed.

I managed to backtrace this to the following 'problem':

One User U got multiple access rights for one model M.

For example:
 - U was owner AND contributor of M or
 - U was contributor AND reader of M or
 - U was listed 2 times as a contributor of M.

After removing one of the dublicate right entries from the database 
(table: "interaction"), the repository view could display all the 
information again.

I see two possible solutions for this:
 - Either fix the SQL/Hibernate queries to deal with models having 
multiple rights for one user defined or
 - Prevent multiple rights for one user on one model to be defined.

Original issue reported on code.google.com by stefan.k...@hpi-alumni.de on 5 Feb 2009 at 5:53

GoogleCodeExporter commented 9 years ago

Original comment by stefan.k...@hpi-alumni.de on 5 Feb 2009 at 5:53

GoogleCodeExporter commented 9 years ago
what revision you are using? it should be fixed in rev1737. it occured when you 
have
selected multiple models and added access rights.

Original comment by NicoPete...@gmail.com on 6 Feb 2009 at 11:01

GoogleCodeExporter commented 9 years ago
We've also gone through this here. We are using revision 3252. It's easily
reproducible: just give reader or contributor access to the owner of any model.

I've done some changes in class org/b3mn/poem/business/Model to get rid of this
problem. I modified methods getAccessRights() and getAccessRight(openId) to 
consider
only the higher access level in case of more than one access found. How should I
share this solution with the group?

Regards,

Daniel Viero
SERPRO - Brasil

Original comment by daniel.v...@gmail.com on 10 May 2010 at 8:33