[Tutor] multi-user program question

Deirdre Saoirse deirdre@deirdre.net
Mon, 19 Mar 2001 17:01:44 -0800 (PST)


On Mon, 19 Mar 2001, Timothy Condit wrote:

> I'm going to be writing a python script for use by several (~15)
> people here at work. It will allow users to request paid time off
> (vacations, personal days, etc.). Before getting too far into it, I'm
> trying to work out a couple questions.

> * what is the best way to store the pto request info? Creating a home
> dir requires root access, so I want to find an alternative to that.

Why not use a database like mysql? Postgres?

> * if using a pto home dir turns out to be the best way to go, how can
> I run a script as user pto? A friend of mine says he runs perl scripts
> this way, but I cannot figure out how (and he's not around).

http://www.python.org/doc/current/lib/os-procinfo.html

> * if I use the /home/pto/<user>/ directory scheme, how can I arrange so
> that an admin (my boss) can still view all that info but users cannot
> view each other's info? There will only be one admin account, who will
> add and delete users, accept/decline pto requests, etc. So he needs to
> be able to view all user info.


> I am inclined to think that these sort of issues have come up and been
> resolved by others, and am curious about any good ideas anyone has. I've
> got my own ideas, but so far nothing that feels quite right.

My inclination would be to slap a web interface on it; this hides the data
quite neatly. Access can be handled with an htaccess file and people can
see only what they have access to.

You can still plop the info into a database or a text file.

--
_Deirdre   NEW Stash-o-Matic: http://fuzzyorange.com  http://deirdre.net
"I love deadlines. I like the whooshing sound they make as they fly by."
                                                         - Douglas Adams