Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRE if user has not roles #22

Open
dmitrydvm opened this issue Feb 21, 2019 · 2 comments
Open

NRE if user has not roles #22

dmitrydvm opened this issue Feb 21, 2019 · 2 comments
Labels
Bug🐞 Something isn't working

Comments

@dmitrydvm
Copy link

dmitrydvm commented Feb 21, 2019

If user has not roles, exception throw here

var userRoles = user.getAttribute(OpenLdapAttributes.MemberOf.ToDescriptionString()).StringValues;

How can I get user roles from AD?

@Nordes
Copy link
Owner

Nordes commented Mar 5, 2019

Yes, it will throw. I tested with MS AD, and in most of my cases I had a default role assigned to the user. A try/catch should be done in that part in order to avoid such exception. I will mark this as a bug to be fixed. I will try to find when I have the time to fix it.

The same issue will happen in MS AD

var userRoles = user.getAttribute(ActiveDirectoryLdapAttributes.MemberOf.ToDescriptionString()).StringValues;

@Nordes Nordes added question Further information is requested Bug🐞 Something isn't working and removed question Further information is requested labels Mar 5, 2019
@abhisheknaik07
Copy link

This is not yet fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants