[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ganymede Help] How to disable the field

Date Sun, 31 Mar 2002 23:30:47 +6600 (CST)
From Jonathan Abbey <jonabbey@arlut.utexas.edu>

| Hi.
| 
| I am wondering how can I disable a field in the
| ganymede tool so that administrator can view the field
| but cannot edit it (including the superuser) ? The
| value of the field will be read from a config file via
| the customisized code.

Right now, it looks as though there is no way to make a field
non-editable for the superuser without editing some of the base
classes (such as DBObject.java and DBField.java) in the Ganymede
server.

If you look at the getFieldPerm() method in the DBObject.java source
file, you'll see that it immediately grants full privileges if the
field is being looked at by the superuser.

That would need to be changed if you needed to create a field which
the superuser could not edit.

When I say 'could not edit', I mean where the client did not even
allow the user to attempt to edit the field.

It's easy enough to use the DBEditObject finalizeSetValue() method so
that whenever any user (including the superuser) attempted to change a
field that you didn't want changed, an error message was returned.
This would let you make the field effectively non-editable, even
though the Ganymede client would allow the attempt.

| sze yee

-------------------------------------------------------------------------------
Jonathan Abbey 				              jonabbey@arlut.utexas.edu
Applied Research Laboratories                 The University of Texas at Austin
Ganymede, a GPL'ed metadirectory for UNIX     http://www.arlut.utexas.edu/gash2

----------------------------------------------------------------------------
To make changes to your subscription to the Ganymede Help list, send
mail to majordomo@arlut.utexas.edu.

To unsubcribe, include the line

unsubscribe ganymede-help

in the body of your mail message

Visit the Ganymede web page at http://www.arlut.utexas.edu/gash2

----------------------------------------------------------------------------


  • Re: [Ganymede Help] How to disable the field
    • From: Jonathan Abbey <jonabbey@arlut.utexas.edu>