filesysteme

This commit is contained in:
Mathieu Lagacé
2020-09-12 10:13:21 -04:00
parent ae00c9e7e0
commit b3f471e6e9
21 changed files with 952 additions and 1221 deletions

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MakeAclRulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('acl_rules', function (Blueprint $table) {
$table->increments('id');
$table->string('user_id')->nullable();
$table->string('rank_id')->nullable();
$table->string('job_id')->nullable();
$table->string('disk');
$table->string('path');
$table->tinyInteger('access');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('acl_rules');
}
}

View File

@@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Seeder;
class ACLTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('acl_rules')->insert([
[
'user_id' => '*',
'rank_id' => '0',
'job_id' => '0',
'disk' => 'storage',
'path' => '/',
'access' => '1'
],
[
'user_id' => '*',
'rank_id' => '0',
'job_id' => '0',
'disk' => 'storage',
'path' => 'Publique',
'access' => '1'
],
[
'user_id' => '*',
'rank_id' => '0',
'job_id' => '0',
'disk' => 'storage',
'path' => 'Publique/*',
'access' => '1'
],
[
'user_id' => '0',
'rank_id' => '1',
'job_id' => '0',
'disk' => 'storage',
'path' => '*',
'access' => '1'
],
]);
}
}

View File

@@ -18,6 +18,7 @@ class DatabaseSeeder extends Seeder
UsersTableSeeder::class,
ComplementaryActivitiesSeeder::class,
EventTypeSeeder::class,
ACLTableSeeder::class,
]);
}
}