共用方式為


What access do I have?

If you are using Optional Access in your HealthVault authorization rules, then at times you may want to know whether a particular user has authorized an optional piece of the data type access.  You can find out what actions are currently authorized for a {user, record, app} by calling PersonInfo.SelectedRecord.QueryPermissions.  You can read more about this method at https://msdn.microsoft.com/en-us/library/microsoft.health.healthrecordinfo.querypermissions.aspx.  You can also use a similar method, QueryPermissionsByType, https://msdn.microsoft.com/en-us/library/microsoft.health.healthrecordaccessor.querypermissionsbytypes.aspx.

HealthVault does *not* allow an application to ask what access a particular user has to a particular record, but it can ask what that user has authorized for use in this application.

I hope that clears things up a little.

Comments

  • Anonymous
    September 04, 2009
    One quick addition-- If you want to determine what the possible full set of pemissions would be, you can just look at the online and offline rules your application has configured via the GetApplicationInfo() call.  By comparing the two, you can determine if your application has the full current set of permissions, or if it has a previous (more limited) set-- and, therefore, if your app wants to redirect the user to HealthVault to reauthorize your application to get permission for the new data rules.