+ Start a Discussion

Can I determine if user is licensed for my package?

I am using the LMA and want to know if it is possible to programmaticaly tell if a user has been licensed for my package. 


Imagine if I wanted users of the application to see each other's application specific data - at minimum I would need a list of users that are licensed to use the application.


Is this possible? I want to be able to add code to the package that can be used to make decisions based on whether users have been granted a license seat through the LMA's "Manage Licesnes" process.


It appears that you can only tell if the current user has permission via UserInfo.isCurrentUserLicensed(namespace), but not if any other given user is licensed. However, you might also try UserLicense and see if the data in there helps, as the documentation states that there may be custom license types in an organization.


Hey folks, I am looking into a similar issue and found the UserInfo method that you speak of... but if the user doesn't have access to the package, they can't run any of your code and hence you can only run this check for users who have a license.  So it's a worthless method if your package is 100% native, yes?


The specific thing I am trying to accomplish is actually exactly the same problem in this thread:

http://boards.developerforce.com/t5/Visualforce-Development/Action-Override-to-Managed-VF-page-breaks-other-users/td-p/174983 (new window)