Hello all,
I am trying to write a bit of sql which returns a list of user logins who have permission to run a selected object, based the roles they belong to.
I have got so far but have just hit a brick wall. ](*,)
Here is what I have so far:
select * from [Permission] P
JOIN "Windows Access Control" WAC on P."Role ID" = WAC."Role ID"
JOIN "Windows Login" WL on WAC."Login SID" = WL."SID"
where [Object ID] = '[INSERTDESIREDIDHERE]'
Now this would be ok if the User ID were populated, but in what I am seeing for our install it isnt, so all I have is an SID to work with.
Can anyone help me with where to go from here? is there a way to use this data to link in the sysusers table? or is there a different table in Navision that I could link to?
Cheers in advance
L Duddridge
Comments
As an example I have a report which 3 people have access to, only one has a User ID filled out and the other 2 are some how linked, but I do not know how.
I've found a "user role" table, but have not found a User ID column in that.
We are running version 3.7 is that any help?
Lookup("SID - Account ID".ID WHERE (SID=FIELD(Login SID)))
beautiful.
If I cannot access that outside of Navision then I can hopefully stick a report to get the data!
Thanks fella.
\:D/
Does anyone know what the raw SQL script is that would build the "SID - Acount ID" table...????
Thanks
I'm not crazy !!! Just ask my toaster...
.