2008/6/13 Frank Ludolph <[EMAIL PROTECTED]>: > Danek Duvall wrote: >> On Fri, Jun 13, 2008 at 09:18:49AM -0500, Shawn Walker wrote: >> >> >>> Darren Moffat wrote: >>> >>>> Shawn Walker wrote: >>>> >>>>> I was looking for a confident way to ensure "up-front" that a user has >>>>> the necessary privileges without relying on the (incorrect) >>>>> sledgehammer approach of requiring root. >>>>> >>>> There isn't one and not even checking for uid=0 is correct. >>>> >> >> So while I understand all that, I'd like a bit of clarification on two >> points. >> >> First, as I understand it, it's good form for a GUI to disable (grey out or >> whatever) operations which are inappropriate or impossible at any given >> time, such as installing a package onto an image where you don't have >> sufficient permissions to complete the operation successfully. >> >> - Is this not actually the good form I think it is? >> > Not in this case. When a button/menu item is disabled, the user will ask > "why". If the answer is pretty obvious, e.g. "Bold" is disabled when an > image is selected, it is pretty obvious since "Bold" is not a resonable > command to perform on an image. However in the case you question, The > command "install" is reasonable for the selection, a selected package. > It is not at all obvious to the user that "install" is disabled for > security reasons. In these cases the best approach is to leave the > command (button, menu item) enabled and display an error dialog if the > command is invoked. This informs the user of the problem and can suggest > a corrective action.
I also dislike programs that attempt to verify that an operation will succeed before allowing it, since if permissions change *after* they perform their check, you have to exit the program and restart it before you can perform the operation. -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
