Read Security Filters from .NET

I have a C# .net application that creates cubes for navision. I want to replicate security, but can’t work out how to read the [Permission].[Security Filter] (varchar binary) column from SQL.

I’m guessing that its probably a binary serialized colleciton of some sort, but don’t know how to deserialize it.

How do I get the information out of this column?

Thanks in advance

Probably me not knowing enough about SQL, but don’t the security filters in NAV just map to standard security in SQL? Seems like there would be a way to do it without going through a NAV table.

Security in SQL doesn’t support row level security as far as i know

But security filters in NAV can only be used with SQL. Surely that information has to be stored in SQL somewhere. I can’t see the NAV client checking / adding security filters every time you do a GET or FIND.

It’s a great question, though. Hopefully someone else can answer as I too am interested.

I know a little more. It looks like all the information about security filter’s is in the SecurityFilter column, but how its stored needs some reverse engineering.

Bit 0 is the object ID of the table the filter applies to
Bit 8 looks like the column id
There is some ASCII encoded text for the filtered values.

Probably only the NAV devleopers know the exact format and how the operators/multiple values are encoded.