Forum OpenACS Development: fresh openacs 5.80d1 xowiki 0.146, write unable to edit index page

Request notifications

Gustaf et al,

On a fresh development site, it appears that users with write (but not admin) permission are unable to edit the index page.

I don't need a fix for this (just noticed on a development site).



This is just a write issue.

If the index page is deleted, the user is able to create a index page.

The behavior is intentional - but can be configured. Since the index-page contains often content that an admin wants to control, admin permissions are required per-default for editing the index page.

Background: The standard permission policy of an xowiki instance is policy1, which is defined as follows (in xowiki/tcl/package-procs-tcl)

  Policy policy1 -contains {
    Class Page -array set require_permission {
      view               none
      revisions          {{package_id write}}
      diff               {{package_id write}}
      edit               {
        {{regexp {name {(weblog|index)$}}} package_id admin} 
        {package_id write}
This means, that for objects of class Page (i.e. all kind of xowiki pages) edit operations are allowed under the following premises:
  • when the name of the page ends with weblog or index, the user has to have admin rights on the package_id
  • otherwise, the user has to have write permissions on the package_id.
This is exactly. what you observe.

One can modify this policy by editing package-procs.tcl, or one can use one of the other predefined policies, or one add site-specific policies (e.g. in a separate file) and configure it in the package parameters...

all the best

Thank you for the detailed explanation.

It seemed like a thoughtful bug, but I didn't see anything about it in the documentation regarding the detailed example Policy1.

That's excellent flexible use of permissions.