How to use VideoOS.Platform.Util.SecurityAccess.IsMember( )?

I would like to check if the current user is a member of the Administrators Role.

I found VideoOS.Platform.Util.SecurityAccess.IsMember, which does exactly that. I know how to get the current ServerId, and I know how to get the AdministratorRoleId, but I don’t know what the second parameter is for, “string sidIdentity”?

I have a guess. I guess you can use this..

string VideoOS.Platform.Login.LoginSettings.UserIdentity

[get]

The Identity of the user that have logged in. The Identity cam be a user SID or a GUID if it is a basic user.

My guees is that this will give you what you need to do the lookup. Note that I have not found the time to test this theory and conduct any experiments, please let me know if I am right or wrong.

Yes, this works. I was thrown by the documentation, which states “This method will check if current user is part of a specific role.” If it’s checking current user permissions, why would it need a user ID? Obviously, the documentation is in error.

Milestone will make a correction to the MIP documentation. Thank you for making us aware of this.