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

is_user_admin function in new Rhino-8 .NET 7 #321

Open
ed-p-may opened this issue Jan 9, 2024 · 0 comments
Open

is_user_admin function in new Rhino-8 .NET 7 #321

ed-p-may opened this issue Jan 9, 2024 · 0 comments

Comments

@ed-p-may
Copy link

ed-p-may commented Jan 9, 2024

Hi @chriswmackey , @mostaphaRoudsari , I am running into a few issues with the ladybug_rhino.is_user_admin() function in the new .NET 7 in Rhino 8 I wanted to flag.

  1. This function does not seem to work as explained in the function's comments? On my machine, in Rhino 7, even when the user is NOT admin, those methods called do exist (contrary to the comment there on line 135).
    Screenshot 2024-01-09 at 10 11 48 AM

  2. Also, I think this function should return False in the except block. The docstring states it returns a boolean, not a boolean | None

  3. In .NET 7 and Rhino 8, it does not appear (on my machine at least) that the property "WindowsPrincipal" exists any longer? When I query the System.Security.Principal in Rhino 8 I now see only:
    ['GenericIdentity', 'GenericPrincipal', 'IIdentity', 'IPrincipal', 'PrincipalPolicy', 'TokenImpersonationLevel']

I can verify Rhino 8 is in 'As-Admin' mode in 'Taskmanager' checking the 'Elevated' process status.

Do you have any thoughts on how to resolve this change in Rhino 8? Perhaps there is some new / other way to check 'is-admin' now in .NET 7? For reference, I have cross-posted this issue to the Mcneel discourse as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant