Next: 13. Bounces management
Up: Sympa Mailing Lists Management Software
Previous: 11. List configuration parameters
  Contents
  Index
Subsections
12. Shared documents
Shared documents are documents that various users can manipulate
on-line via the web interface of Sympa, whether they're authorized
to. A shared space belongs to a list, and the users of this list
can upload, download, delete... documents in the shared space.
WWSympa shared web features are basic. The goal is not to provide
one more sophisticated tool for web publishing, as web dav or such
product like Rearsite provide.
Anyhow, it is very useful to be able to define privilege on
web documents in relation with list attributes, like subscribers,
list owners, or list editors.
In order to have a better control on the documents of
the shared space, each document is linked with specific information :
its access rights. The safety is thus ensured.
Shared documents of a list are stored in the directory
~sympa/expl/mylist/shared.
This chapter describe how the shared documents are managed,
especially considering access rights control.
In the following, we will see :
- the kind of operations performed on shared documents
- the access rights management
- the access rights control specification
- the actions on shared documents behaviour
- the template files
12.1 The three kind of operations on a document
Concerning shared documents, we can distinguish three kind of operations which
have the same constraints relating to access control :
- The reading operation :
It consists in :
- If it's a directory, open it and list its content (only the
sub-documents the user is authorized to ``see'').
- If it's a file, download it, but also display it if it's a
viewable file (text/plain, text/html or image).
- The edition operation :
It regroups :
- Subdirectory creation
- File uploading
- Description of a document (title and basic information)
- Edition on-line of a text file
- Document (file or directory) removal.
If it's a directory, it must be empty.
These various actions have the same behaviour concerning access rights. If a user is
authorized to edit a directory, he can create a subdirectory or upload a file inside,
describe or delete this directory. If a user is authorized to edit a file, he can edit
it on-line, describe it, replace or remove it.
- The control operation :
The control operation is directly linked with the access rights notion. If we want the
shared documents to be safe, we have to control the access on document. Everybody must not
be authorized to do everything on shared documents. Consequently, each document has
specific access rights for reading and editing. The control on this document consists
in changing this Read/Edit rights.
The control operation has more restrictive access rights than the two other operations.
Only the owner of a document, the privileged owner of the list and the listmaster have
control rights on a document. So, another action possible on a document if you can
control it is to set the owner of a document.
12.2 The description file
The information (title, owner, access rights...) relative to each document must be stocked. That's
why each shared document is linked with a special file called a description file.
These files have the prefix .desc.
The description file of a directory having the path mydirectory/mysubdirectory has the path
mydirectory/mysubdirectory/.desc .
The description file of a file having the path mydirectory/mysubdirectory/myfile.myextension has the path
mydirectory/mysubdirectory/.desc.myfile.myextension .
Here is the structure of a decription file of a document : file or directory.
You should never have to edit those files.
title
<description of the file in several words>
creation
email <email of the owner of the document>
date_epoch <date_epoch of the creation of the document>
access
read <access rights for read>
edit <access rights for edit>
This example is for a document that subscribers can read and only the owner of the document
and the owner of the list can edit.
title
module C++ which uses the class List
creation
email Bill.Gates@Cplusplus.com
date_epoch 998698638
access
read private
edit owner
12.3 The predifined scenarii
The scenario public is the most permissive scenario. It enables anyone (including
unknown users) to perform the action.
The scenario private is the basic scenario of a shared space. Every subscriber of
the list is authorized to perform the action. The scenario private is the default
read scenario of the shared when the shared space is created.
The default scenario is used only in the list configuration. You can modify it editing
the list configuration file.
The scenario owner is the more restrictive scenario of a shared space.
Only the listmaster, the owners of the list, and the owner of the document
or those of one of the parent documents are allowed to perform the action.
The default scenario for editing is the scenario owner in the list
configuration.
12.4 The access control
The access control is an important operation, which is performed
before every access to a document of the shared space.
The access control on a document of the hierarchy is an iterative
operation on all its parent directories.
Here are the regulars adopted for the access control.
Listmaster and privileged list owner are particular users in the shared
web. They are allowed to perform every action on every document of
the shared space. This precaution permits to keep the control on
the shared space. Listmaster and privileged owner can't be excluded
from any document of the shared space.
12.4.2 The directory shared special case
In order to allow to have a root directory more restrictive than
the subdirectories, the directory shared (root directory) has
a special treatment concerning the access control.
The access rights for read and edit are those of the list configuration file.
The control on the root directory is specific.
The users allowed to change access rights on directory shared are those allowed to edit the
configuration of the list.
Let's take a document with a relative path in the shared space
mydirectory/mysubdirectory/myfile. This is not a document
of the root directory. Let's suppose that a user X wants to perform one
of the three operations (read, edit, control) on this document.
The access control will use the following process :
- Reading operation case
To be authorized to perform the reading action on the document
mydirectory/mysubdirectory/myfile, the user X must be
authorized in the description file to read each document of the
path in their description file.
Thus, to be allowed to read the file
mydirectory/mysubdirectory/myfile, X must be allowed
to read myfile (the scenario of the description file
of myfile must return do_it with the user X), but
must also be allowed to read mysubdirectory
and mydirectory.
However, the owner of a document or of one of the parent directories
of the document are allowed to perform each action on the document.
So, the owners of myfile, mysubdirectory,
and mydirectory are authorized to read
mydirectory/mysubdirectory/myfile.
So we can resume this with :
X can read <a/b/c>
if
(X can read <c>
AND X can read <b>
AND X can read <a>)
OR
(X owner of <c>
OR X owner of <b>
OR X owner of <a>)
- Editing operation case
The regulars for edit are exactly the same as read.
X can edit <a/b/c>
if
(X can edit <c>
AND X can edit <b>
AND X can edit <a>)
OR
(X owner of <c>
OR X owner of <b>
OR X owner of <a>)
- Control operation case
The access control before performing the control action (change rights
or set the owner of a document) is much more restrictive.
Only the owner of a document or the owners of one of the parent
documents are allowed to control this document.
Which can be resumed with :
X can control <a/b/c>
if
(X owner of <c>
OR X owner of <b>
OR X owner of <a>)
The shared web feature has called for some new actions.
- action D_ADMIN
Create the shared web, close it or restore it. The d_admin action is accessible
from the page admin of the list.
- action D_READ
Reads the document after read access control. If it's a folder, lists all the subdocuments that can
be read. If it's a file, shows it if it is viewable and download it else.
If the document to read contains a file named index.html or index.htm and if
the user has no other privileges than read on all the documents inside, the read action will
consist in displaying the index.
The d_read action is accessible from the page info of the list.
- action D_CREATE_DIR
Creates a new subdirectory in a directory that can be edited.
The creator is the owner of the directory. The access rights are
those of the parent directory.
- action D_DESCRIBE
Describes a document that can be edited.
- action D_DELETE
Deletes a document after edit access control. If it's a folder, it has to be empty.
- action D_UPLOAD
Uploads a file in a directory that can be edited.
- action D_OVERWRITE
Overwrites a file if it can be edited. The new owner of the file is the one who has done
the overwriting operation.
- actions D_EDIT_FILE and D_SAVE_FILE
Edits a file and save it after edit access control. The new owner of the file is the one
who has done the saving operation.
- action D_CHANGE_ACCESS
Changes the access right to a document (read or edit) if can be controled.
- action D_SET_OWNER
Changes the owner of a directory if can be controled. The directory must be empty. The new
owner can be anyone but he will have to identify to perform any action on the document.
The following template files have been created for shared web:
The default page for reading a document. If it's a file, display it if it's
viewable and download it. If it's a directory, shows the listing of all
the subdocuments that can be read, and for each one, proposes the buttons
to perform actions that are allowed. If the directory can be
edited, proposes the buttons to describe it, upload a file
inside, create a new subdirectory. If it can be edit, propose a button to
edit the access to it.
The page used to edit a file. If it's a text file, permits to edit it on-line.
The description of the file can be edited in this page. The file can be replaced
by another using this page.
The page to edit the access rights and the owner of a document.
Next: 13. Bounces management
Up: Sympa Mailing Lists Management Software
Previous: 11. List configuration parameters
  Contents
  Index
root
2000-12-20