mirror of
https://github.com/filegator/filegator.git
synced 2025-04-17 13:12:02 +02:00
docs upd
This commit is contained in:
parent
b3400d7577
commit
dc73a18bbc
@ -29,6 +29,9 @@ menu:
|
||||
install:
|
||||
text: Installation
|
||||
relativeUrl: install.html
|
||||
account:
|
||||
text: Users
|
||||
relativeUrl: accounts.html
|
||||
development:
|
||||
text: Development
|
||||
relativeUrl: development.html
|
||||
@ -57,3 +60,9 @@ menu:
|
||||
text: Security
|
||||
relativeUrl: configuration/security.html
|
||||
|
||||
multilang:
|
||||
name: Languages
|
||||
items:
|
||||
english:
|
||||
text: Translations
|
||||
relativeUrl: translations/default.html
|
||||
|
28
docs/accounts.md
Normal file
28
docs/accounts.md
Normal file
@ -0,0 +1,28 @@
|
||||
## User roles
|
||||
|
||||
There are 3 different user roles:
|
||||
- Admin (for user management)
|
||||
- User (regular, logged in user)
|
||||
- Guest (anonymous, not logged in)
|
||||
|
||||
|
||||
## User permissions
|
||||
|
||||
There are 6 different user permissions you can assign to each user:
|
||||
|
||||
- Read (user can browse and list files and folders)
|
||||
- Write (user can copy, move, rename, and delete files)
|
||||
- Upload (user can upload files to the repository)
|
||||
- Download (user can download files from the repository)
|
||||
- Bach Download (user can download multiple files and folders at once)
|
||||
- Zip (user can zip and unzip files)
|
||||
|
||||
|
||||
Some permissions require others. For example, Batch Download requires Read permissions (so than user can list files and select them) as well as basic Download permissions.
|
||||
|
||||
## Guest account
|
||||
|
||||
Guest account is predefined account and it is disabled by default since no permissions is assigned.
|
||||
|
||||
Admin can enable Guest account which will allow everyone to interact with the repository based on the Guest account permissions.
|
||||
|
@ -14,7 +14,7 @@ Default handler accepts only file name parameter. This file should be writable b
|
||||
```
|
||||
|
||||
## Configuring Auth service to use database
|
||||
You can also use mysql database to store your users.
|
||||
You can use mysql database to store your users.
|
||||
|
||||
First, create a table ```users``` with this sql query:
|
||||
```
|
||||
|
@ -5,6 +5,19 @@ You can edit ```configuration.php``` to change the basic things like logo image,
|
||||
|
||||
NOTE: if you've made a mistake in configuration file, forgot to close a quote, the script will throw an error. Please use provided default ```configuration_sample.php``` to verify this.
|
||||
|
||||
```
|
||||
'frontend_config' => [
|
||||
'app_name' => 'FileGator',
|
||||
'app_version' => APP_VERSION,
|
||||
'language' => 'english',
|
||||
'logo' => 'https://raw.githubusercontent.com/filegator/filegator/master/dist/img/logo.png',
|
||||
'upload_max_size' => 100 * 1024 * 1024, // 100MB
|
||||
'upload_chunk_size' => 1 * 1024 * 1024, // 1MB
|
||||
'upload_simultaneous' => 3,
|
||||
'default_archive_name' => 'archive.zip',
|
||||
],
|
||||
```
|
||||
|
||||
## Additional HTML
|
||||
You can add additional html to the head and body like this:
|
||||
```
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
## Configuring Security
|
||||
## Configuring Security service
|
||||
|
||||
Simple security service is included in the script by default. This service provides:
|
||||
|
||||
|
@ -1,4 +1,24 @@
|
||||
|
||||
## Default Session handler
|
||||
|
||||
Session handling is provided through the Symfony's [HttpFoundation](https://symfony.com/doc/current/components/http_foundation.html) component. Please check their docs for more info.
|
||||
|
||||
Default session handler will user PHP's built in file storage. You can also specify your own ```$save_path``` to store session files.
|
||||
|
||||
```
|
||||
'Filegator\Services\Session\SessionStorageInterface' => [
|
||||
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
|
||||
'config' => [
|
||||
'handler' => function () {
|
||||
$save_path = null; // use default system path
|
||||
//$save_path = __DIR__.'/private/sessions';
|
||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler($save_path);
|
||||
|
||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
|
||||
},
|
||||
],
|
||||
],
|
||||
```
|
||||
## Configuring Session service to use database
|
||||
|
||||
First, create a table ```sessions``` with this sql:
|
||||
|
3
docs/template/css/main.css
vendored
3
docs/template/css/main.css
vendored
@ -47,7 +47,8 @@ header.navbar {
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#sidebar {
|
||||
position:fixed;
|
||||
/*position:fixed;*/
|
||||
position:absolute;
|
||||
}
|
||||
}
|
||||
@media (max-width: 960px) {
|
||||
|
92
docs/translations/default.md
Normal file
92
docs/translations/default.md
Normal file
@ -0,0 +1,92 @@
|
||||
## Translations
|
||||
|
||||
Default language file is located under ```/frontend/translations/english.js```. You can add more languages in the same folder and adjust ```language``` variable in your ```configuration.php``` file to use it.
|
||||
|
||||
|
||||
You should only translate value on the right, for example:
|
||||
|
||||
```
|
||||
'Close': 'Schliessen',
|
||||
```
|
||||
|
||||
Default language file is:
|
||||
|
||||
```
|
||||
const data = {
|
||||
'Selected': 'Selected: {0} of {1}',
|
||||
'Uploading files': 'Uploading {0}% of {1}',
|
||||
'File size error': '{0} is too large, please upload files less than {1}',
|
||||
'Upload failed': '{0} failed to upload',
|
||||
'Per page': '{0} Per Page',
|
||||
'Folder': 'Folder',
|
||||
'Login failed, please try again': 'Login failed, please try again',
|
||||
'Already logged in': 'Already logged in.',
|
||||
'Please enter username and password': 'Please enter username and password.',
|
||||
'Not Found': 'Not Found',
|
||||
'Not Allowed': 'Not Allowed',
|
||||
'Please log in': 'Please log in',
|
||||
'Unknown error': 'Unknown error',
|
||||
'Add files': 'Add files',
|
||||
'New': 'New',
|
||||
'New name': 'New name',
|
||||
'Username': 'Username',
|
||||
'Password': 'Password',
|
||||
'Login': 'Log in',
|
||||
'Logout': 'Log out',
|
||||
'Profile': 'Profile',
|
||||
'No pagination': 'No pagination',
|
||||
'Time': 'Time',
|
||||
'Name': 'Name',
|
||||
'Size': 'Size',
|
||||
'Home': 'Home',
|
||||
'Copy': 'Copy',
|
||||
'Move': 'Move',
|
||||
'Rename': 'Rename',
|
||||
'Required': 'Please fill out this field',
|
||||
'Zip': 'Zip',
|
||||
'Batch Download': 'Batch Download',
|
||||
'Unzip': 'Unzip',
|
||||
'Delete': 'Delete',
|
||||
'Download': 'Download',
|
||||
'Copy link': 'Copy link',
|
||||
'Done': 'Done',
|
||||
'File': 'File',
|
||||
'Drop files to upload': 'Drop files to upload',
|
||||
'Close': 'Close',
|
||||
'Select Folder': 'Select Folder',
|
||||
'Users': 'Users',
|
||||
'Files': 'Files',
|
||||
'Role': 'Role',
|
||||
'Cancel': 'Cancel',
|
||||
'Paused': 'Paused',
|
||||
'Confirm': 'Confirm',
|
||||
'Create': 'Create',
|
||||
'User': 'User',
|
||||
'Admin': 'Admin',
|
||||
'Save': 'Save',
|
||||
'Read': 'Read',
|
||||
'Name': 'Name',
|
||||
'Write': 'Write',
|
||||
'Upload': 'Upload',
|
||||
'Permissions': 'Permissions',
|
||||
'Homedir': 'Home Folder',
|
||||
'Leave blank for no change': 'Leave blank for no change',
|
||||
'Are you sure you want to do this?': 'Are you sure you want to do this?',
|
||||
'Are you sure you want to allow access to everyone?': 'Are you sure you want to allow access to everyone?',
|
||||
'Are you sure you want to stop all uploads?': 'Are you sure you want to stop all uploads?',
|
||||
'Something went wrong': 'Something went wrong',
|
||||
'Invalid directory': 'Invalid directory',
|
||||
'This field is required': 'This field is required',
|
||||
'Username already taken': 'Username already taken',
|
||||
'User not found': 'User not found',
|
||||
'Old password': 'Old password',
|
||||
'New password': 'New password',
|
||||
'Wrong password': 'Wrong password',
|
||||
'Updated': 'Updated',
|
||||
'Deleted': 'Deleted',
|
||||
'Your file is ready': 'Your file is ready',
|
||||
}
|
||||
|
||||
export default data
|
||||
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user