Subject Re: [IBO] LiveMode - read this Jason.
Author Carlos H. Cantu
Remember a previous discussion about this "rights thing" ? Now some IBX
defenders on my Interbase-BR list are saying that IBX has the answer and IBO not
(...zzzzZZZ).

I think something similar would be interesting to IBO people using ROLES...
it would make the life easier for them.

From the IBX 4.52 README file :

2. New Property - IBDatabase, IBQuery, IBTable - LiveMode, public, Set of TLiveMode, read-only.

Starting in 4.5 IBX should better support Roles. If you have an InsertSQL, ModifySQL,
DeleteSQL and RefreshSQL assigned, when the Dataset is prepared the LiveMode
property will reflect what permissions were granted by the server. LiveMode is a set with
the following possible values

(lmInsert, lmModify, lmDelete, lmRefresh)

So if your user does not have insert privledges then LiveModes would have
[lmModify, lmDelete, lmRefresh] and CanInsert will return false. IBX will stop
you from going into InsertMode if lmInsert is not part of the LiveMode set.

You can query LiveMode to determine the roles granted, or normally just let IBX
handle the stopping of editing, inserting etc. as needed.

[]s

Carlos
WarmBoot Informatica - http://www.warmboot.com.br
Interbase-BR - http://www.interbase-br.com

>> Is there a property in IBO similar to the new one in IBX "LiveMode"?

JW> I don't know what IBX's "LiveMode" is. Perhaps you could be more specific
JW> about what you want?

>> I have the problem that various users have different rights and I use
>> the same IBOQuery for everyone. So because my iboq component has an
>> insert_sql it gives an error when a user who does not have rights to
>> insert opens it... ...although I control access from my app...

JW> IBO has a RequestLive capability which will try and figure out how to
JW> deliver a live dataset for you. As long as your queries are fairly simple it
JW> will usually figure it out. It does not automatically take permissions into
JW> consideration. This is a requested feature that I may consider for a future
JW> release.

JW> You might like to take a look at using the PreventInserting, PreventEditing
JW> and PreventDeleting properties which would allow you to control the
JW> permissions in your application.

JW> HTH,
JW> Jason Wharton
JW> CPS - Mesa AZ
JW> http://www.ibobjects.com






JW> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/