Added missing permissions to roles
This commit is contained in:
parent
6be5e241d4
commit
b0cbf65cfc
|
@ -3,6 +3,8 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Helpers\Options;
|
||||
use App\Options as Option;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
|
@ -15,11 +17,12 @@ class OptionsController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$options = Options::all();
|
||||
// TODO: Obtain this from the facade
|
||||
$options = Option::all();
|
||||
|
||||
|
||||
return view('dashboard.administration.positions')
|
||||
->with('options');
|
||||
->with('options', $options);
|
||||
}
|
||||
|
||||
public function saveSettings(Request $request)
|
||||
|
|
|
@ -17,10 +17,14 @@ class NewPermissions extends Seeder
|
|||
'name' => 'developer'
|
||||
]);
|
||||
|
||||
$admin = Role::where('name', 'admin')->first();
|
||||
|
||||
Permission::create(['name' => 'admin.settings.view']);
|
||||
Permission::create(['name' => 'admin.settings.edit']);
|
||||
|
||||
$developer->givePermissionTo('admin.developertools.use');
|
||||
$admin->givePermissionTo('admin.settings.view');
|
||||
$admin->givePermissionTo('admin.settings.edit');
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue