From 305746b618352bd20e9187b6c108fa148371d5e4 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Tue, 18 Jun 2019 18:53:18 +0200 Subject: [PATCH] Website generation with Couscous --- configuration/auth.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configuration/auth.html b/configuration/auth.html index a66933d..3dcf507 100644 --- a/configuration/auth.html +++ b/configuration/auth.html @@ -108,8 +108,8 @@ ],

Configuring Auth service to use database

-

You can also mysql database to store your users.

-

First, create a table users with this sql:

+

You can also use mysql database to store your users.

+

First, create a table users with this sql query:

CREATE TABLE `users` (
     `id` int(10) NOT NULL AUTO_INCREMENT,
     `username` varchar(255) NOT NULL,
@@ -121,12 +121,12 @@
     PRIMARY KEY (`id`),
     KEY `username` (`username`)
 ) CHARSET=utf8 COLLATE=utf8_bin;
-

Then, import default users with this query:

+

Then, import default users with sql query:

INSERT INTO `users` (`username`, `name`, `role`, `permissions`, `homedir`, `password`)
 VALUES
 ('guest', 'Guest', 'guest', '', '/', ''),
 ('admin', 'Admin', 'admin', 'read|write|upload|download|batchdownload|zip', '/', '$2y$10$Nu35w4pteLfc7BDCIkDPkecjw8wsH8Y2GMfIewUbXLT7zzW6WOxwq');
-

At the end, open configuration.php and update AuthInterface handler to:

+

At the end, open configuration.php and update AuthInterface handler to reflect your database settings:

        'Filegator\Services\Auth\AuthInterface' => [
             'handler' => '\Filegator\Services\Auth\Adapters\Database',
             'config' => [
@@ -137,7 +137,6 @@ VALUES
                 'database' => 'filegator',
             ],
         ],
-

Don't forget to enter correct database details.