Hi,
in gemstone stream next throws an exception if the stream is atEnd. In pharo it returns nil. I changed in
PBBlog>>defaultChildName
code next
ifNotNilDo: [ :separator | stream nextPut: separator ] ] ]
to
code atEnd
ifFalse: [ stream nextPut: code next ] ] ]
Norbert
I installed a complete new pier on a fresh gemstone image and noticed that the RSS views are not working. This is due another "aString is not equal to aSymbol" issue.
In PRPierFrame class>>classFromRequest: aRequest name: aString base: aBaseClass
there is
^ aBaseClass withAllConcreteClasses
detect: [ :each |
each isAbstract not
and: [ each name = value
or: [ each label = value ] ] ]
ifNone: [ nil ]
but class names are symbols and http parameters are strings. So I changed this to
^ aBaseClass withAllConcreteClasses
detect: [ :each |
each isAbstract not
and: [ each name = value asSymbol
or: [ each label = value ] ] ]
ifNone: [ nil ]
Norbert
Hi all,
I'm reading the chapter on magritte in the seaside book and found this
in section 24.5 :
"There are advantages to having your rules outside your domain objects,
[...snip...] Still you have to pay attention since it may weaken your
domain model."
Any pointer to a discussion about the pro/cons of this approach ?
Nothing important, I'm just curious to know...
Cheers,
Francois
Hi,
i have a model with some descriptions.
One of it, descriptionMap, is set with beHidden property because i think to use it only for update the relative cache description into descriptionContainer.
The relative code is :
^( super descriptionContainer )
addCondition:[ : memento|
memento cache at: self descriptionOK
ifTrue: [ memento cache at: self descriptionMap put: 'xyz'. true ]
ifFalse:[ false ].
]
labelled: 'Error is not ok;
yourself
The cache is right update.
The problem is to update the model relative to the descriptionMap cache.
When confirm the form other instances model is right update but descriptionMap not.
Any idea?
Thanks,
Dario
At 14:46 01/04/2010, you wrote:
>You need to go to the configuration of the application and change the
>'Server Base Path' to '/'.
Many thanks Lukas; it works now.
(the site may be down, since he is "playing" with Apache).
Cheers,
Reza
Hi Lukas,
At 13:12 01/04/2010, you wrote:
>What happens when he logs in?
The same page is just rendered again.
>What happens if he gives wrong username and password?
Just nothing.
>Anything else that is broken?
Well, I wanted once to show him how Pier works. So, on his local
machine, I logged and added a post to the blog. But, then wasn't able
to find it, neither in the blog page, nor in in the archive list. I'm
not sure; maybe I've made a wrong manipulation.
Just in case you would like to have a look, his experimental site is here:
<http://www.bamlux.net/>http://www.bamlux.net/
username and password are the default ones.
The image is the one available at:
http://piercms.com/
It's running on a Debian / Apache2 server, configured following your
instructions here:
http://www.piercms.com/doc/deploy
Thanks for having considered my request,
Regards,
Reza
Hi,
I pointed Pier to a student. He installed and deployed it, thanks to
piercms.com. However, he is unsuccessful in logging into the deployed
image, whilst the same work on his local computer.
Any comment and suggestion would be greatly appreciated,
Regards,
Reza
I'm still experimenting with Templating and things like that. I tried to create a page with
+comp+
as content. I thought taking that page and adding a child named comp would be sufficient but it isn't. Everything is resolved on save time or better when the document gets parsed. I can achieve what I want by doing.
structure := (PRPathLookup start: self context structure path: '/mytemplate') copy.
structure addChild: ((PRComponent named: 'comp')
componentClass: MyComponent ).
structure document: (PRDocumentParser parse: (PRWikiWriter write: structure document)).
But I think there more elaborate versions of doing this. I'm not sure if update on the internal link will help. Then a visitor could probably do the job.
thanks,
Norbert
Hi,
I'm struggling to understand how to use Pier Security. I have a number of
different types of users (registeredUsers, projectOwners, AdminUsers, ....).
I'd like to enable user specific options on the main pages, and restrict
access to specific pages and commands to groups of users. I've grouped my
users into different PUGroup s . Then without entirely understanding the
intent of the code in PRDistribution>>root :
self rootPage enumerator
with;
all;
do:
[ :each |
each securityDecoration owner: self kernel users anyOne.
each securityDecoration group: self kernel groups anyOne ].
self makePrivate: self systemPage.
I modified my own configuration code to read:
self homePage enumerator
with;
all;
do:
[ :each |
each securityDecoration owner: self kernel users anyOne.
each securityDecoration group: self kernel groups anyOne.
each securityDecoration group: self kernel registeredUserGroup.
each securityDecoration group: self kernel projectUserGroup.
each securityDecoration group: self kernel adminUserGroup.
].
I can see that PUSecurity>>hasPermission:for: and
PRStructure>>isAllowedCommand:in: should reveal the secrets of how security
is designed to work, however the following code assumes all decorations
satisfy the conditions
PRStructure>>isAllowedCommand:in:
^ self decorations allSatisfy: [ :each |
each
isAllowedCommand: aCommandClass
in: aContext ]
In my case this tests fails as not all decorations are allowed. For example
if a user is in the group "projectOwners", isAllowedCommand:in: fails for
the security decorator for "registeredUserGroup" and "adminUserGroup". With
my limited understanding I would have expect the above loop to read
"anySatisfy:" rather than "allSatisfy" .
Clearly I've a misunderstanding about how Pier security is designed to
function. Any pointers gratefully received.
Thanks
Nick