Simple Groupware Administration: Folder templates

Folder templates are used to automatically create folder structures for new users, new projects and new departments.
All folder templates are placed as XML files in "bin/modules/core/". During the installation, the main folder structure is read from "folders.xml" (or "folders_minimal.xml", "folders_small.xml" without demo folders). User profiles are created from "users.xml". Department profiles use "departments.xml" and projects use "projects.xml".
Every template has a nested set of "<folder>...</folder>" tags. All folders have a name and a module type. Additionally mountpoints, rights and a data import file can be specified. Data import files use the CSV format with column names in the first line or XML using column names as tags inside an "asset" tag. If a folder has no rights specified, it uses the rights of its parent. To refer to a field of a new dataset (e.g. user, project, department), the column is wrapped with "@" characters, e.g. to refer to the username as folder name, use: name="@username@". Typical attributes are:

AttributeDescriptionExample
nameName of the folderFiles
typeModule assigned to the folderfiles
anchorUnique identifier for the folderhome_@username@)
rread_groupsGroups with read permissiongroupname_a|groupname_b
rwrite_groupsGroups with write permissiongroupname_a|groupname_b
rread_usersUsers with read permissionusername_a|username_b
rwrite_usersUsers with write permissionusername_a|username_b
radmin_usersUsers with admin permissionusername_a|username_b
rexception_usersUsers with exceptional permissions for viewsfreebusy:read:anonymous
rexception_groupsGroups with exceptional permissions for viewsfreebusy:read:anonymous
dataData import file in CSV or XML formatmodules/core/departments_portal.xml
default_valuesDefault values used when creating a new asset or moving/copying an asset to the folder (inheritance to subfolders without default values)project=pr1
mountpointSets a mountpoint for the current folderfs:../simple_store/home/@username@/

Note: If a folder does not have a permission attribute (e.g. rread_users), the permissions from the parent folder will be used.

Examples:

Inline data import:

<folder name="Contacts" type="contacts">
  <assets>
    <asset>
      <lastname>Doe</lastname>
      <firstname>John</firstname>
      <contactid>JDO</contactid>
      <company>DoeCorp</company>
    </asset>
    <asset>
      <lastname>Doe</lastname>
      <firstname>Mary</firstname>
      <contactid>MDO</contactid>
      <company>DoeCorp</company>
    </asset>
  </assets>
</folder>

XML data import:

<folder name="Contacts" type="contacts" data="../import/data_contacts.xml">
</folder>

data_contacts.xml:

<assets>
  <asset>
    <lastname>Doe</lastname>
    <firstname>John</firstname>
    <contactid>JDO</contactid>
    <company>DoeCorp</company>
  </asset>
  <asset>
    <lastname>Doe</lastname>
    <firstname>Mary</firstname>
    <contactid>MDO</contactid>
    <company>DoeCorp</company>
  </asset>
</assets>

CSV data import:

<folder name="Contacts" type="contacts" data="../import/data_contacts.csv">
</folder>

data_contacts.csv:

lastname,firstname,contactid,company
Doe,John,JDO,DoeCorp
Doe,Marty,MDO,DoeCorp

When creating a new department, the default folder structure for departments will be created under "Workspace / Personal department". Also a new group with the name of the department will be created under "Workspace / Organisation / Groups". Initially this group is empty and all its members have read and write access on the new folder structure for the department. The members of this group are independant from any settings made in the department dataset (manager / second manager, members).

When creating a new project, the default folder structure for projects will be created under "Workspace / Personal projects". Also a new group with the name of the project will be created under "Workspace / Organisation / Groups". Initially this group is empty and all its members have read and write access on the new folder structure for the project. The members of this group are independant from any settings made in the project dataset (manager, internal / external participants).

When creating a new user, the default folder structure for users will be created under "Workspace / Personal folders". Initially the new user has read and write access on his personal folders. Also when creating a new user, a new folder named "<sgs-dir>/simple_store/home/<username>" will be created on the hard disk.
This folder can be directly accessed within Simple Groupware under "Workspace / Personal folders / <username> / Files / Import / <username>". The idea behind this is to use it for Samba shares or symbolic links to home directories.