How to check Windows domain security group membership of current user in QT?
-
We have a QT controls GUI written in C++ (w/CMAKE) for a Windows-only environment. We've been asked to lock certain functions of the software behind AD security group membership(s) of the current user, as soon as humanly possible. In the old days, I would have done this with ADSI -- but that's 20 years old and I really don't want to add the Windows SDK as a dependency to this thing if I don't have to. It doesn't look like QAuthenticator does what I need, here; it passes a credential TO the domain, but doesn't populate that credential based on information obtained from the domain. What are my alternatives? Is there a newer and lighter C++ library I can use if there's nothing native to QT that does this?
-
Hi and welcome to devnet,
No, there's nothing related to that in Qt.
Maybe this StackOverflow thread might provide a starting point.
-
Hi and welcome to devnet,
No, there's nothing related to that in Qt.
Maybe this StackOverflow thread might provide a starting point.
@SGaist, thanks! It's good to at least have confirmation that I wasn't missing something obvious. I think I'm going to go the ADSI route on this, since it's what I've used before -- but I have to admit that I'm surprised that this mechanism hasn't evolved at all in the two decades since I last had to do this.
Now I just need to figure out how to link ADSI libraries in CMAKE in our Linux dev environment for cross-compiling on our Windows target. But that's not a QT problem. :)
-
@SGaist, thanks! It's good to at least have confirmation that I wasn't missing something obvious. I think I'm going to go the ADSI route on this, since it's what I've used before -- but I have to admit that I'm surprised that this mechanism hasn't evolved at all in the two decades since I last had to do this.
Now I just need to figure out how to link ADSI libraries in CMAKE in our Linux dev environment for cross-compiling on our Windows target. But that's not a QT problem. :)
@Tom-Davidson you don't change something that is in used in so many industries that would get you sued into oblivion :-)
As for linking the library, I think the find_library command should help you with that.