Has anyone written or is awhare of anyone who has written security for dimensions. Can you specify wheich dimensions may be entered on a transaction by a user, or restrict which dimensions are viewable by a user.
I have done something like that.
There are some some fileds in user setup and dimension value tables.
and of course some code on Dimension value form to do the filtering.
since filtering is using filtergroup other then 0, user cannot remove filters...
"DimCode" "DimValue Group"
--------------------------
Code1 A
Code2 B
Code3 C
Code4 AC
"UserID" "DimValue GroupFilter"
-------------------------------
User1 *A*
User2 *B*
User3 *A*|*B*
User4 *C*
User5 *
After setting the filters,
User1 will see Code1 and Code4
User2 will see Code2
User3 will see Code1 and Code2 and Code4
User4 will see Code3 and Code4
User5 will see everything
As you see DimValue can belong to more groups and user can see more groups. We have many to many relationship, so practically you can achieve any combination you want.
Also you can choose default behaviour if nothing is set on user (see everything or see nothing-more secure).
Some more security ?
Use FILTERGROUP function to prevent user from removing filters:
Or you could use the permissions in the autorisation, but then you will have to use sql database. It fairly works. You can set a filter on the dimension values this way.
Comments
There are some some fileds in user setup and dimension value tables.
and of course some code on Dimension value form to do the filtering.
since filtering is using filtergroup other then 0, user cannot remove filters...
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Table 349 - Dimension Value
Table 91 - User Setup
You define on each DimValue record a "DimValue Group". You can use some special subtable or just plain A,B,C...
In UserSetup record you enter a filter that will be valid for each user: *A* or *A*|*B* or *C*
On open form of DimValue List (F560) you just use something like that:
Example:
As you see DimValue can belong to more groups and user can see more groups. We have many to many relationship, so practically you can achieve any combination you want.
Also you can choose default behaviour if nothing is set on user (see everything or see nothing-more secure).
Some more security ?
Use FILTERGROUP function to prevent user from removing filters:
Even some more security ?
Use this code when validating dimensions.
Even some more security ?
Use this code when posting dimensions.
Here's also exact code that I use (some more code to work nicely)
From 560 - Dimension Values
OnOpenForm()
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯