|
ConfigurationMultiUserMode
Configuration in multi-user mode
1. ConfigurationTo set up a multi-user environment in file based configuration, you have to define user accounts with variable $USERS in file "configuration.php". Syntax is: $USERS = array(
[USER_ID] => array("name" => [USER NAME], "password" => [PASSWORD]),
...
);For example: $USERS = array(
"1" => array("name" => "User 1", "password" => "foo"),
"2" => array("name" => "User 2", "password" => "bar")
);This configuration has two users, "User 1" and "User 2". Rules for user configuration: 2. Published DirectoriesMollify supports freely selectable published directories, which need not to have any relation with each other. Each user can have different set of directories available. Use following format to define published directories: $PUBLISHED_DIRECTORIES = array(
[USER_ID] => array(
[DIR_ID] => array("name" => [DIR_NAME], "path" => [DIR_PATH]),
...
),
...
);For example: $PUBLISHED_DIRECTORIES = array(
"1" => array(
"r1" => array("name" => "Folder A", "path" => "/foo/bar"),
"r2" => array("name" => "Folder B", "path" => "/foo/bay")
),
"2" => array(
"r1" => array("name" => "Folder A", "path" => "/foo/bat"),
"r2" => array("name" => "Folder C", "path" => "/foo/baz")
)
);With this configuration Rules are: NOTE! Currently all files and directories are recursively exposed, so carefully select your configuration. 3. User Access ControlMollify supports configurable user access control for files. By default, when no configuration is done, users have read-only permissions to all files. File permissions can be granted in two levels: Possible file permission values are: 3.1. User Default File PermissionDefault file permission is defined in user account configuration with attribute file_permission_mode. For example: $USERS = array(
"1" => array("name" => "User 1", "password" => "foo", "file_permission_mode" => "RW"),
"2" => array("name" => "User 2", "password" => "bar", "file_permission_mode" => "RO")
);This configuration gives "User 1" read/write permissions, and "User 2" read-only permissions, unless file specific permissions override these. In addition to default permission modes, in multi-user environment user can be set to admin mode with value "A". Admin users are allowed to access everything regardless of file permission configurations. Later on, admin users will also have options and actions available that are not visible for non-admins. For example: $USERS = array(
"1" => array("name" => "User 1", "password" => "foo", "file_permission_mode" => "A"),
"2" => array("name" => "User 2", "password" => "bar", "file_permission_mode" => "RO")
);This would make "User 1" an admin user. 3.2. File Specific PermissionsMollify supports file specific permissions, which override any possible default permissions. File specific permissions are defined in folder level (no inheritance in folder hierarchy), with a user access control file (see wiki page for more information). Each folder has its own user access control file, which applies only to files in that folder. Each file can have permissions set to user id's (see chapter 1. Configuration): Example scenarios: |
Sign in to add a comment