mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
filesysteme
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
49
database/seeds/ACLTableSeeder.php
Normal file
49
database/seeds/ACLTableSeeder.php
Normal 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'
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ class DatabaseSeeder extends Seeder
|
||||
UsersTableSeeder::class,
|
||||
ComplementaryActivitiesSeeder::class,
|
||||
EventTypeSeeder::class,
|
||||
ACLTableSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user