[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Checking write permission from a perl script



On Thu, 4 May 2000, Chris Garrigues wrote:

# > 	I'm having a hard time imagining where that would be useful.  What
# > are you trying to do?
# 
# I don't want to offer to my user the opportunity to change things that
# can't be changed. 

	Ahh...that makes sense.  You need to be prepared for the thing to
fail either way, but from a UI point of view, it is a good idea to just
not show something.  The way I handle that in my own tools is to have the
interface understand what groups are allowed to do which things, and have
the list of groups the user is in stored in the application.  Then I just
do something like (obviously pseudo-code):

	if(user_is_in_group("blah")) {
		showOption("options_requiring_blah");
	}

--
SA, beyond.com           My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE 
L_______________________ I hope the answer won't upset her. ____________