CGI sensitive to user"s access level?

CGI sensitive to user"s access level?

am 05.07.2007 22:38:37 von mailbox

I need to write our CGI scripts so that
the user sees a page tailored to his
access level. That is, the more privileged
user will see additional menu options on
the main page that an "ordinary" user won't see.
For this to happen, obviously, the script
that generates the main page needs to
know which user is invoking it.

Access control being a new area for me,
I read the Apache tutorials, and I guess
I understand how Basic access control
works. Could somebody point me to information
on how to relate that to my requirements?
Others must have wanted to do something similar,
and I don't want to reinvent the wheel.

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacker.org

Re: CGI sensitive to user"s access level?

am 06.07.2007 05:31:56 von kwan

On Jul 5, 3:38 pm, mail...@cpacker.org wrote:
> I need to write our CGI scripts so that
> the user sees a page tailored to his
> access level. That is, the more privileged
> user will see additional menu options on
> the main page that an "ordinary" user won't see.
> For this to happen, obviously, the script
> that generates the main page needs to
> know which user is invoking it.
>
> Access control being a new area for me,
> I read the Apache tutorials, and I guess
> I understand how Basic access control
> works. Could somebody point me to information
> on how to relate that to my requirements?
> Others must have wanted to do something similar,
> and I don't want to reinvent the wheel.
>
> --
> Charles Packerhttp://cpacker.org/whatnews
> mailboxATcpacker.org

If you are using CGI script, it is how you redirect the user according
to their password and login name. You must write the script to check
the status of the user and display the information accordingly.
Storing the information on the database, and retrieve the information,
validate the information by checking the users status, and generate
the scripts.

Re: CGI sensitive to user"s access level?

am 06.07.2007 15:43:34 von mailbox

On Jul 5, 11:31 pm, kwan wrote:
> On Jul 5, 3:38 pm, mail...@cpacker.org wrote:
> If you are using CGI script, it is how you redirect the user according
> to their password and login name. You must write the script to check
> the status of the user and display the information accordingly.



But I don't know how to determine which user has logged in.

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacker.org

Re: CGI sensitive to user"s access level?

am 07.07.2007 05:20:34 von kwan

On Jul 6, 8:43 am, mail...@cpacker.org wrote:
> On Jul 5, 11:31 pm, kwan wrote:
>
> > On Jul 5, 3:38 pm, mail...@cpacker.org wrote:
> > If you are using CGI script, it is how you redirect the user according
> > to their password and login name. You must write the script to check
> > the status of the user and display the information accordingly.
>
> But I don't know how to determine which user has logged in.
>
> --
> Charles Packerhttp://cpacker.org/whatnews
> mailboxATcpacker.org

You have to check the user name or password with the information store
in the database, it is how you record your users information.
for me, I store it according to the number that I retrieve, just say,
you put 1 for administrator login which show the addictional menu
lists, and 0 for normal users which show only the accessible menu
lists..