[DALICORE-82] Calling AuthorizationBean.getTypePermissionByType returns all type permissions from all applications. Created: 03/Dec/12  Updated: 16/Apr/13  Resolved: 04/Dec/12

Status: Closed
Project: dalicore
Component/s: dalicore-ejb
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0

Type: Bug Priority: Major
Reporter: Joeri Sykora Assignee: Joeri Sykora
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


All the DaliCore entities are somehow linked to a certain application. Also, all relations between the entities can only be between entities that are within the same application. To achieve this, every DaliCore entity (Content, Group and User) has the field "appKey" which specifies to what application the entity belongs. When you try to add a user from application A to a group from application B, DaliCore will throw a DaliCoreException of type APPKEY_CONFLICT.

Now, all cases are normally handled, except for one: the TypePermission. When retrieving all type permissions by type, there is no application context available. This means, that it should be provided by the user of the method AuthorizationBean.getTypePermissionsByType. However, this is currently not the case. Which means that calling this method will currently retrieve ALL the type permissions across all the applications that have the specified type.

The solution is simple: add a method that allows the application key to be provided when getting a list of type permissions by type. The current method will still exist, but will return the type permissions from the application with an empty key (where the appKey equals ""). Compare this for example with the method UserBean.getByType where the same logic is applied.

Comment by johanvos [ 03/Dec/12 ]

sounds the right thing to do.

Comment by Joeri Sykora [ 16/Apr/13 ]

DaliCore version 1.1.0 released.

Generated at Thu May 28 08:30:45 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.