mirror of
https://github.com/filegator/filegator.git
synced 2025-08-12 17:44:26 +02:00
Website generation with Couscous
This commit is contained in:
@@ -108,8 +108,8 @@
|
|||||||
],
|
],
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2 id="configuring-auth-service-to-use-database">Configuring Auth service to use database</h2>
|
<h2 id="configuring-auth-service-to-use-database">Configuring Auth service to use database</h2>
|
||||||
<p>You can also mysql database to store your users.</p>
|
<p>You can also use mysql database to store your users.</p>
|
||||||
<p>First, create a table <code>users</code> with this sql:</p>
|
<p>First, create a table <code>users</code> with this sql query:</p>
|
||||||
<pre><code>CREATE TABLE `users` (
|
<pre><code>CREATE TABLE `users` (
|
||||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||||
`username` varchar(255) NOT NULL,
|
`username` varchar(255) NOT NULL,
|
||||||
@@ -121,12 +121,12 @@
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `username` (`username`)
|
KEY `username` (`username`)
|
||||||
) CHARSET=utf8 COLLATE=utf8_bin;</code></pre>
|
) CHARSET=utf8 COLLATE=utf8_bin;</code></pre>
|
||||||
<p>Then, import default users with this query:</p>
|
<p>Then, import default users with sql query:</p>
|
||||||
<pre><code>INSERT INTO `users` (`username`, `name`, `role`, `permissions`, `homedir`, `password`)
|
<pre><code>INSERT INTO `users` (`username`, `name`, `role`, `permissions`, `homedir`, `password`)
|
||||||
VALUES
|
VALUES
|
||||||
('guest', 'Guest', 'guest', '', '/', ''),
|
('guest', 'Guest', 'guest', '', '/', ''),
|
||||||
('admin', 'Admin', 'admin', 'read|write|upload|download|batchdownload|zip', '/', '$2y$10$Nu35w4pteLfc7BDCIkDPkecjw8wsH8Y2GMfIewUbXLT7zzW6WOxwq');</code></pre>
|
('admin', 'Admin', 'admin', 'read|write|upload|download|batchdownload|zip', '/', '$2y$10$Nu35w4pteLfc7BDCIkDPkecjw8wsH8Y2GMfIewUbXLT7zzW6WOxwq');</code></pre>
|
||||||
<p>At the end, open <code>configuration.php</code> and update AuthInterface handler to:</p>
|
<p>At the end, open <code>configuration.php</code> and update AuthInterface handler to reflect your database settings:</p>
|
||||||
<pre><code> 'Filegator\Services\Auth\AuthInterface' => [
|
<pre><code> 'Filegator\Services\Auth\AuthInterface' => [
|
||||||
'handler' => '\Filegator\Services\Auth\Adapters\Database',
|
'handler' => '\Filegator\Services\Auth\Adapters\Database',
|
||||||
'config' => [
|
'config' => [
|
||||||
@@ -137,7 +137,6 @@ VALUES
|
|||||||
'database' => 'filegator',
|
'database' => 'filegator',
|
||||||
],
|
],
|
||||||
],</code></pre>
|
],</code></pre>
|
||||||
<p>Don't forget to enter correct database details.</p>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user