2017-02-17 08:57:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class PermissionsSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
// album:list-gallery = controls if the album is visible in the gallery
|
|
|
|
DatabaseSeeder::createOrUpdate('permissions', [
|
|
|
|
'section' => 'album',
|
|
|
|
'description' => 'list-gallery',
|
2017-03-21 21:48:55 +00:00
|
|
|
'is_default' => true,
|
|
|
|
'sort_order' => 0
|
2017-02-17 08:57:05 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
// album:view = controls if the album can be viewed
|
|
|
|
DatabaseSeeder::createOrUpdate('permissions', [
|
|
|
|
'section' => 'album',
|
|
|
|
'description' => 'view',
|
2017-03-21 21:48:55 +00:00
|
|
|
'is_default' => true,
|
|
|
|
'sort_order' => 20
|
|
|
|
]);
|
|
|
|
|
|
|
|
// album:edit = controls if the album is visible and can be edited in the admin panel
|
|
|
|
DatabaseSeeder::createOrUpdate('permissions', [
|
|
|
|
'section' => 'album',
|
|
|
|
'description' => 'edit',
|
|
|
|
'is_default' => true,
|
|
|
|
'sort_order' => 10
|
2017-02-17 08:57:05 +00:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|