Subject Re: [IBO] AlterUser - new possibilities
Author Pirtea Calin
Try this:
http://www.volny.cz/iprenosil/interbase/ip_ib_isc4.htm

it help you chose better for those isc4 changes


""Lucas Sroka"" <L.Sroka@...> wrote in message
news:9sg1i7$cna$1@......
> Hello
>
> I just want to share my new discovery to Interbase and IBObjects - please
> don't laugh at me If it's already well known solution :
>
> As You know sometimes it's necessary to allow users change their passwords
> without SYSDBA intervence.
> IB_Connection has very interesting method AlterUser - but if you try to
call
> it and you aren't logged as SYSDBA there is an exception - it's part of
> server security. Only SYSDBA is allowed to alter USERS table in isc4.gdb.
> But if you grant UPDATE for table USERS to PUBLIC and add following
'before
> update' trigger for USERS table :
> IF (USER <>'SYSDBA') THEN
> IF (USER<>OLD.USER_NAME)
> THEN EXCEPTION E_ABORT;
> then every user will be able to change his and only his password.
> I verified it and
> AlterUser(uaModifyUser,Connection1->Username,password,"","","","");
> works fine !
> If you want to preserve GroupName, and FIRST Middle and LastName fields
just
> add some code to above trigger like :
> if LAST_NAME='' then NEW.LAST_NAME=OLD.LAST_NAME;
>
> greeeeeeetings
>
> Lucas Sroka
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>