Announcing XOTcl 1.6.6
*************************
Dear XOTcl Community,
We are pleased to announce the availability of XOTcl 1.6.6
Major changes relative to 1.6.5 are:
* improved 64-bit compatibility (expat)
* fixed minor memory leaks (info methods, forward error case)
* fixed potential cyclic dependencies via namespace imports
during cleanup
* fixed potential crash with var-traces being fired twice
* compatibility with Tcl 8.6b1
* fix for debian packaging
For more details about the changes, please consult the ChangeLog and
documentation. The planned next release will be 2.0.0
MORE INFORMATION
General and more detailed information about XOTcl and its
components can be found at http://www.xotcl.org
best regards
-gustaf neumann
While XOTcl has a way to ask to query the object that is calling the current procedure, there does not seem to be a way to find out which object was 'previous' on the stack. I'll illustrate:
Class C
C instproc hello {} {
puts "Hello, [self callingobject]"
}
C instproc do {} {
my hello
}
Now if I call [hello] from another object, I will get the object which called [hello]. Of course, if that object calls [do] instead of [hello], then [self callingobject] will end up being the same as [self]. [uplevel] doesn't help here as [self callingobject] will always return the same, whatever stack level I call it from (is this a bug or intentional?). Basically there is no way to check "caller of caller" or, indeed, the "original caller" — ie. the object before [self] which initiated the process.
The reason I want to do this is that I have an access control system which calls something like [checkPermissions]. [checkPermissions] should just return and do nothing if the original calling object is equal to [self]. Now I end up having to passs [checkPermissions] a parameter with [self callingobject].
I guess I could also do this with a filter but that might be overkill for something so simple.
--
Kristoffer Lawson, Co-Founder, Scred // http://www.scred.com/
... didn't add xotcl@alice to the receiver's list
----- Weitergeleitete Nachricht von mark.strembeck(a)wu.ac.at -----
Datum: Sun, 11 Jul 2010 08:38:18 +0200
Von: Mark Strembeck <mark.strembeck(a)wu.ac.at>
Antwort an: Mark Strembeck <mark.strembeck(a)wu.ac.at>
Betreff: Re: [Xotcl] Calling object
An: Kristoffer Lawson <setok(a)scred.com>
Cc: mark.strembeck(a)wu.ac.at
Hi Kristoffer,
Zitat von Gustaf Neumann <neumann(a)wu-wien.ac.at>:
>
>> The reason I want to do this is that I have an access control
>> system which calls something like [checkPermissions].
>> [checkPermissions] should just return and do nothing if the
>> original calling object is equal to [self]. Now I end up having to
>> passs [checkPermissions] a parameter with [self callingobject].
>>
> I am somewhat confused by your terminology. If you are looking for
> access control management, look for example at xoRBAC, which follows
> the role based access control model, standardized by the NIST
> http://wi.wu-wien.ac.at:8002/home/mark/xoRBAC/index.html
>
> the basic notion in access control is based on <subject> <pred> <object>
> idea, which subject (individual, user) is allowed to execute which operations
> (pred)on which objects.
From your e-mails i understand that you are looking for some
feature/mechanism
to control the accessability of methods in a class hierarchy (public,
protected, private). In this case, xoRBAC is not the tool for you.
xoRBAC is a component providing an access control service following the
role-based access control paradigm. While xoRBAC's concepts and general
functionality are still valid and "up to date", most of the xoRBAC source
code was written in 1999 (using xotcl 0.85 i guess). Therefore, i'm
planning to re-implement the xoRBAC source using some of the xotcl feature
that were added since these early days and my (significantly) increased
knowledge of software development :) ... however, although i'm
planning this
re-implementation for some time now, i simply didn't find the time
to actually
do it yet ... maybe this summer.
... just for your information.
best regards,
Mark
----- Ende der weitergeleiteten Nachricht -----
Has anyone done any code or a framework for managing per-class permissions? Basically a way to do rules describing which other objects, or which roles users must have, in order to call the different methods provided by instances of the class (plus any class procs). This is kind of like an expanded approach to Java style simple permissions (private/protected/public), which of course could also be incorporated into that, if wanted.
I'm just asking as I've been giving that some thought in relation to my web framework (and object store) and reckoned it would make sense asking here so as not having to reinvent the wheel.
--
Kristoffer Lawson, Co-Founder, Scred // http://www.scred.com/
Hi, I've been playing around with the XOTcl Httpd module for my web framework, Spindle (http://github.com/Setok/Spindle). When looking through the source it seems there is no support for multiple cookies to the same domain.
OK, there's actually no support for cookies, as such, but the worker does have access to the 'meta' instance variable, which has all the fields of the HTTP request. Unfortunately this does not work with cookies, as I understand them, as they can appear as follows:
Cookie: band=front242;
Cookie: album=Tyranny For You;
In that case the meta variable would only have a single cookie, the latter, set. Am I missing something?
--
Kristoffer Lawson, Co-Founder, Scred // http://www.scred.com/