survirtual / vue-adal

Vue plugin for using Azure Active Directory
108 stars 29 forks source link

CheckRoles guard against null/undefined role list #6

Closed TranscendOfSypherus closed 6 years ago

TranscendOfSypherus commented 6 years ago

From our AzureAD there is no 'roles' property defined on the this.user.profile object and as such I was getting an error that indexOf was not defined when the role check was being performed. I have added a guard against a null or missing roles list so that role checks fail if the user's profile has no roles.

survirtual commented 6 years ago

Nice catch -- thank you for the contribution.