Hi Hannes,
However I still do not understand the issue on the
level of the
folders / structures.
>> Now the structure itself is not involved,
this means that if I want
>> to have a special page that only a certain person can edit but
>> everybody else cannot I have to create a special role for that. Am
>> I correct? Or is it possible to grant permission at the instance
>> level like a page?
>
> Just define the anonymous role in that structure without the
> edit-permissions.
Let's say I have a root folder and four subfolders
Cam
history
language
socialanthropology
glossary
I do not want to allow user 'anonymous' to enter and view the contents
of the four subfolders. How do I do that?
Basically you define the roles and their global permissions in the
server. If history, language, ... are the only folders in your wiki,
you might want to adjust the global role of 'anonymous' by removing the
permission to view folders, pages and resources.
" fetch the default role of anonymous "
role := server roles
detect: [ :each | each name = 'anonymous' ].
" remove the permissions we don't want to give "
role remove: Page permissionView.
role remove: Folder permissionView.
role remove: Resource permissionView.
The result will be that the login-dialog will pop-up immediately when
browsing to any site of the wiki.
However, more advanced use of the SmallWiki security framework allows a
much finer control of permissions: If you want to look all the pages
for anonymous people, you have to redefine the anonymous role just in
those folders that should be protected. To give an example, I take your
configuration and show how to disable viewing for anonymous users for
those folder and all its children, but not for the root folder and
other content of the wiki:
" get a copy (!) of the default role of anonymous, so we don't
have to put together all the permissions from scratch "
role := server roles
detect: [ :each | each name = 'anonymous' ].
role := role copy.
" adjust the permissions "
role remove: Page permissionView.
role remove: Folder permissionView.
role remove: Resource permissionView.
" apply the role to all the folders we want to protect, this
will override the global role defined in the server "
folder := server root at: 'history'.
folder roles: (Array with: role).
folder := server root at: 'language'.
folder roles: (Array with: role).
...
David Vogel <vogel(a)iamexwi.unibe.ch> is currently working on a
web-interface to manage all the security related settings. Ask him if
you need further information or want to try his interface.
Hope that helps,
Lukas
--
Lukas Renggli
http://renggli.freezope.org