Jump to content
Changes to the Jaspersoft community edition download ×

check if an item does exist in another table.


Recommended Posts


i have a case where i should filter an item from an entity and see if it does exist in another entity and inside the same domain. as an example, the logged in user should be able to see his own records and his subordinate records as well. the user's subordinates are stored in a separate entity . here is what i m planning to set in the domain security file:

<resourceAccessGrant id="request_subcategory_grant_1"                     orMultipleExpressions="true">     <principalExpression>        attributesService.getAttribute('user_id', 'USER', false) != null and attributesService.getAttribute('can_subordinate_records', 'USER', false) = true    </principalExpression>     <filterExpression>        request.holder in (select team_members from subordinate where manager_id = attributesService.getAttribute('user_id', 'USER', false))     </filterExpression> </resourceAccessGrant>[/code]

so, the principalExpression will see if there is a profile attribute user_id and also another profile attribute which is true or false. if the logged in user has access to see his subordinate records then the filterExpression should check the request.holder item if it does exist in another table.

any suggestions, propositions will be very appreciated



Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...