Getting current logged in user

Getting current logged in user

jaapflonk
Participant Participant
424 Views
2 Replies
Message 1 of 3

Getting current logged in user

jaapflonk
Participant
Participant

I made a few custom tools in Vault that i want to hide for people who are not admin or lead engineer.

 

The problem is that VDF.Vault.Library.ConnectionManager.LogIn() requires a password and a name. Right now i hardcoded the admin credentials to call this function and it will return a Connection object with the admin credentials inside (ofcourse).

 

What i want is to call VDF.Vault.Library.ConnectionManager.LogIn() with the credentials of the user that is logged in:

 

jaapflonk_1-1702890187604.png

 

Or another solution would be to still login as admin in my code,  but somehow get the current logged in user in Vault: 

jaapflonk_2-1702890471735.png

 

Some help or example code would be greatly appreciated!

 

Thanks

 

0 Likes
Accepted solutions (1)
425 Views
2 Replies
Replies (2)
Message 2 of 3

Markus.Koechl
Autodesk
Autodesk
Accepted solution
A standalone application requires a dedicated login, like Inventor and Vault Explorer login explicitly. So, Vault extensions can re-use the VE connection, or other Inventor Add-Ins can re-use the Inventor-Vault connection.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 3 of 3

jaapflonk
Participant
Participant

Thanks for the reply @Markus.Koechl 

 

I got it to work.

0 Likes