I have built a web server in python for a local intranet.
I would like to get the user's userid when they click on a link on my web page.
Is this possible??

what do you mean by userid

sorry

to get access to our local intranet every user has to log in to windows.
This is the userid i would like to get.
In the webserver window I can see the computername when an user clicks on the webpage.

//C19

no

ok
thanks for your time

the computername is a hostname, thats easy, you can also get the IP and domain easialy but not the windows username.

thanks for your reply

maybe you can explain something to me then

if a user clicks on a link on my website that points to a picture or document on the network and he hasn't got permission to read that folder where the picture/document is. How can the server know that the user doesn't have access to that specific folder if it doesn't know who the user is?
As soon as the user has got access to the folder on the network the link works fine.

Is it the client who is making the request to the network and not the server?

As you may have noticed I'm not very good at this

the client does it

you could create a login for your intranet.

Not the smoothest idea but that's usually how it works.

LarZ

yeah, in fact, seeing as you are creating a web server yourself, you could try and build HTTP authentication into it, like apaches .htaccess

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.