Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 1881

Access Windows permissions via PHP on IIS 7.5

$
0
0

Hello, I am having some issues relating to IIS 7.5 and am wondering if there's a way I can make it a bit more user-friendly. I've developed/am developing a local intranet site for the company at which I work, and I have it setup to use Windows authentication to allow access to the site, period. My main file is index.php, and I use a case statement to determine what "page" it's on (i.e., ?p=about is the about page, ?p=docs is the documentation page, etc.). Granted, I know that if I used multiple files instead of mostly in the same file, permissions could be a bit easier - but I'd rather not do it this way.

I have an SQL database setup with accounts for admins and managers, and every user has a "permissions" field in their row. If it's greater than or equal to 4, they are an admin, and 5 is a Super User essentially. Basically, what I'm wondering is if there's a way to use Windows permissions (such as what user group somebody's in) to access certain features of the site, such as a variable or a function of some sort.

For example, say that John Doe is part of the Administrators group on the Windows network (we're on a local domain here). He would therefore, since he is an admin, be able to access the Add Update and View Tickets pages. Now say Billy Bob (I'm not good with names) tries to access the same page. He's in the Default Users group, and should NOT be able to view tickets or add updates. That's what I'm going for here. Is there any way to do this with Windows permissions? I'm using PHP, but ASP is enabled if I should need it. As I've said, I've already got the username of the person logged in (as it asks them for their credentials once the site loads). What I need are the permissions from their respective user groups, and a way to access that using PHP. Any help would be appreciated.

I've searched high and low for this but am having trouble finding anything relating to it. Thank you.

-- Paul


Viewing all articles
Browse latest Browse all 1881

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>