On Tuesday 19 April 2005 19:28, Lukas Renggli wrote:
Oups, sorry for my slow replay, too much traffic
lately.
no worries at all! thanks for the comments.
I've checked the versions and its roughly Squeak 3.7 #5989 with
SmallWiki-chbu-0.9.53-10.mcz
(DynamicBindings-gk.1.mcz
KomHttpServer-gk.6.mcz
KomServices-gk.2.mcz
Monticello-avi.231.mcz
Refactory-md.3.7.36.mcz
SmaCC-Runtime-md.4.mcz)
Strange, why the heck there is a barrier role in your
image? This is
actually not part of the base package of SmallWiki. As far as I know it
changes some critical messages in the security framework, so it might
have broken something. David Vogel can you help here?
I have to admit to not having fully checked out a version for VW from Store so
I'll do that and compare. I wanted to use Squeak and public Store is a bit
painful at times.... anyway
I only mentioned the barrier role because the hierarchy goes something like
SWRole
SWBasicRole
SWBarrierRole
and I was stepping through the code and it does some checking.. etc.
so maybe I've got an old version of the port to Squeak? I think it's the one
on SM.
As for the method you mentioned in a later post
---
processSecurity: aRequest
"Update the roles of the current user according to the current role
configuration and to the permisson strips given in the structures role
barrier.
- See #updateRoles: in the \texttt{User} class for additional information.
- if we are on the root structure: clear the roles of the current user"
self = aRequest server root ifTrue: [aRequest clearUserRoles].
aRequest updateRoles: roles
---
so I'm not sure if the difference is important or not. The code in
SWUser>>updateRole: and updateRoles: seems to be where I sit in the debugger
e.g.
---
updateRoles: aCollection
"Create a new user with aCollection of roles updated,
- make sure to remove the permissions in BarrierRole from the user' s
role - exept for an user with an admin permission.
- don't update anything for main administrator"
| myUser |
myUser := self copy.
myUser isNotMainAdmin
ifTrue:
[myUser isNotAdmin
ifTrue: [myUser := self clearRolesFromBarrierPermissions: aCollection].
aCollection notNil
ifTrue:
[^aCollection inject: myUser into: [:user :role | user updateRole:
role]]].
^myUser
updateRole: currentStructureRole
"Create a new user with aRole updated.
if the user owns a role with the currentStructureRole name:
- make a copy of user, and add the permissions of currentStructureRole
to users role with same name; keep also its permission"
^(roles includes: currentStructureRole)
ifTrue:
[| newUser |
newUser := self copy.
roles do:
[:userRole |
userRole name = currentStructureRole name
ifTrue:
[newUser add: ((SWBasicRole name: userRole name)
addAll: userRole permissions;
addAll: currentStructureRole permissions;
yourself)]].
newUser]
ifFalse: [self]
--
anyway I don't need to quote you all the code.
I guess what I would find useful to know is which version I should be using.
It's just a bit frustrating because I have the enthusiasm and I am making
various people aware of SmallWiki but I can't quite get it sorted. I'm just
hoping I've got the wrong version or I'm being usually stupid.
I really want to deploy one version using VW and one version using Squeak in
the short term. Longer term I'm looking at SW2 (started to poke around) and
various extensions etc.
When I tried to load SmallWiki from public store (an aborted attempt because
it took too long), actually when I load almost anything from Store, I tend to
get asked lots of questions about pre-requisite versions. Is there any
advice about which versions I should pick. I wouldn't pick something blessed
as broken but it would be nice to know whether people just take the latest
development versions of all pre-reqs etc.
Thanks for the time
Cheers
Mike