[aida] WikiRender and links
Janko Mivšek
janko.mivsek at eranova.si
Wed Nov 7 16:48:56 CET 2007
Hi Nicolas,
It is my intention to open-source in Aida 6.0 a core of my commercial
CMS which use Wiki too and if you wait a bit more you can use this
infrastructure completely (with versioning etc.) I hope this will happen
soon, but at least to the end of year.
Janko
nicolas petton wrote:
> Hi,
>
> WikiRender doesn't work by default, because #urlFor: (the comment says
> it must be overriden) returns nil and #exist: and #allowed don't exist.
>
> I think it would probably make sense to have a default implementation.
>
> IMHO, the simplest is to have links like this:
>
> [admin > admin.html] (link to http://website.com/admin.html)
> [foo > bar/foo.html] (link to http://website.com/bar/foo.html)
>
> #urlFor: simply becomes :
>
> urlFor: aString
> ^'/', aString asLowercase
>
> #exist: and #allowed: :
>
> exist: aString
> ^self app site urlResolver allURLLinks keys
> contains: [:each | each = (self urlFor: aString)]
>
> allowed: aString
> | observee app right |
> observee := self app site urlResolver allURLLinks at: (self urlFor:
> aString) ifAbsent: [^true].
> app := observee app.
> right := self app site securityManager
> isUser: self app user allowedTo: (app class viewRightSymbolFor: #main)
> on: app class name.
> ^right
>
> #allowed: is not perfect because of parameters (admin.html?view=login
> for example) but I can work on it.
>
> What do you think ?
>
> Cheers,
>
> Nicolas
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
More information about the Aida
mailing list