Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3585

Re: row level security on multiple fields with * for all

$
0
0

Hi,

 

Suppose your account group universe is limited to the following set: { 1, 2, 3, 4, 5 }

 

A solution would be to take advantage of the SQL's IN operator in your universe's join condition(s), so that BOBJ generates JOIN or WHERE clauses like:

 

-- SELECT ... FROM ...

... WHERE table.account_group IN ( account )

 

Here "account" is the 3rd column of your account security table.

 

If you change the asterisk for a comma separated list of all your possible accounts you will achieve the desired result for people allowed to see all the financial accounts:

 

 

UsernameEntitycode
Account
JVDDBRUZT1,2,3,4,5
JVDDCPHZT1,2,3,4,5
BPOBRUZT3
BPOMANZQ3
PBKCPHZT1,2,3,4,5
PBKMANZQ1,2,3,4,5
PBKBRUZT1,2,3,4,5
FSCCPHZT

1

 

For example if user is BPO, built SQL clause will look like

 

-- (something)

... WHERE account IN ( 3 )

 

If user is JVDD built SQL clause will be

 

-- (something)

... WHERE account IN ( 1,2,3,4,5 )


This would also be a straight-forward way to allow two, three or n account groups to be assigned to each user.


Remember your join conditions will be complex joins.

 

I hope this approach leads you to the solution

 

Best regards,

Fernando


Viewing all articles
Browse latest Browse all 3585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>