Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/Actions/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use BookStack\Model;
use BookStack\Traits\HasCreatorAndUpdater;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\MorphTo;

/**
Expand All @@ -15,6 +16,7 @@
*/
class Comment extends Model
{
use HasFactory;
use HasCreatorAndUpdater;

protected $fillable = ['text', 'parent_id'];
Expand Down
3 changes: 3 additions & 0 deletions app/Actions/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
namespace BookStack\Actions;

use BookStack\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\MorphTo;

class Tag extends Model
{
use HasFactory;

protected $fillable = ['name', 'value', 'order'];
protected $hidden = ['id', 'entity_id', 'entity_type', 'created_at', 'updated_at'];

Expand Down
13 changes: 6 additions & 7 deletions app/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ class Application extends \Illuminate\Foundation\Application
*/
public function configPath($path = '')
{
return parent::configPath($path);
// return $this->basePath
// . DIRECTORY_SEPARATOR
// . 'app'
// . DIRECTORY_SEPARATOR
// . 'Config'
// . ($path ? DIRECTORY_SEPARATOR . $path : $path);
return $this->basePath
. DIRECTORY_SEPARATOR
. 'app'
. DIRECTORY_SEPARATOR
. 'Config'
. ($path ? DIRECTORY_SEPARATOR . $path : $path);
}
}
3 changes: 3 additions & 0 deletions app/Auth/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use BookStack\Interfaces\Loggable;
use BookStack\Model;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;

Expand All @@ -23,6 +24,8 @@
*/
class Role extends Model implements Loggable
{
use HasFactory;

protected $fillable = ['display_name', 'description', 'external_auth_id'];

/**
Expand Down
2 changes: 2 additions & 0 deletions app/Auth/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
Expand All @@ -43,6 +44,7 @@
*/
class User extends Model implements AuthenticatableContract, CanResetPasswordContract, Loggable, Sluggable
{
use HasFactory;
use Authenticatable;
use CanResetPassword;
use Notifiable;
Expand Down
File renamed without changes.
11 changes: 7 additions & 4 deletions config/app.php → app/Config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@

// Class aliases, Registered on application start
'aliases' => [

// Laravel
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
Expand All @@ -155,21 +154,23 @@
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'Date' => Illuminate\Support\Facades\Date::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Input' => Illuminate\Support\Facades\Input::class,
'Inspiring' => Illuminate\Foundation\Inspiring::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
// 'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
Expand All @@ -180,6 +181,8 @@
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,

// Laravel Packages
'Socialite' => Laravel\Socialite\Facades\Socialite::class,

// Third Party
Expand Down
15 changes: 13 additions & 2 deletions config/auth.php → app/Config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

return [

// Method of authentication to use
// Options: standard, ldap, saml2, oidc
'method' => env('AUTH_METHOD', 'standard'),

Expand Down Expand Up @@ -45,7 +44,7 @@
'provider' => 'external',
],
'api' => [
'driver' => 'api-token',
'driver' => 'api-token',
],
],

Expand All @@ -58,10 +57,16 @@
'driver' => 'eloquent',
'model' => \BookStack\Auth\User::class,
],

'external' => [
'driver' => 'external-users',
'model' => \BookStack\Auth\User::class,
],

// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],

// Resetting Passwords
Expand All @@ -78,4 +83,10 @@
],
],

// Password Confirmation Timeout
// Here you may define the amount of seconds before a password confirmation
// times out and the user is prompted to re-enter their password via the
// confirmation screen. By default, the timeout lasts for three hours.
'password_timeout' => 10800,

];
20 changes: 14 additions & 6 deletions config/cache.php → app/Config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@
],

'array' => [
'driver' => 'array',
'driver' => 'array',
'serialize' => false,
],

'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],

'file' => [
Expand All @@ -55,11 +57,17 @@
'memcached' => [
'driver' => 'memcached',
'servers' => env('CACHE_DRIVER') === 'memcached' ? $memcachedServers : [],
'options' => [],
],

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'driver' => 'redis',
'connection' => 'default',
'lock_connection' => 'default',
],

'octane' => [
'driver' => 'octane',
],

],
Expand Down
104 changes: 104 additions & 0 deletions app/Config/cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php

use Illuminate\Support\Str;

return [

/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/

'default' => env('CACHE_DRIVER', 'file'),

/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/

'stores' => [

'apc' => [
'driver' => 'apc',
],

'array' => [
'driver' => 'array',
'serialize' => false,
],

'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
],

'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => env('CACHE_DRIVER') === 'memcached' ? $memcachedServers : [],
],

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'lock_connection' => 'default',
],

'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],

'octane' => [
'driver' => 'octane',
],

],

/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/

'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),

];
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 10 additions & 3 deletions config/filesystems.php → app/Config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@
// file storage service, such as s3, to store publicly accessible assets.
'url' => env('STORAGE_URL', false),

// Default Cloud Filesystem Disk
'cloud' => 's3',

// Available filesystem disks
// Only local, local_secure & s3 are supported by BookStack
'disks' => [

'local' => [
'driver' => 'local',
'root' => public_path(),
'visibility' => 'public',
],

'local_secure_attachments' => [
Expand All @@ -45,6 +43,7 @@
'local_secure_images' => [
'driver' => 'local',
'root' => storage_path('uploads/images/'),
'visibility' => 'public',
],

's3' => [
Expand All @@ -59,4 +58,12 @@

],

// Symbolic Links
// Here you may configure the symbolic links that will be created when the
// `storage:link` Artisan command is executed. The array keys should be
// the locations of the links and the values should be their targets.
'links' => [
public_path('storage') => storage_path('app/public'),
],

];
File renamed without changes.
13 changes: 5 additions & 8 deletions config/logging.php → app/Config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,9 @@
'days' => 7,
],

'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],

'stderr' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => StreamHandler::class,
'with' => [
'stream' => 'php://stderr',
Expand Down Expand Up @@ -99,6 +92,10 @@
'testing' => [
'driver' => 'testing',
],

'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],

// Failed Login Message
Expand Down
File renamed without changes.
File renamed without changes.
Loading