Skip to content

Commit

Permalink
Bug fixes for 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 1, 2021
1 parent 9c7c49d commit f3f9e7c
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stubs/config/shibboleth.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

'idp_login' => '/Shibboleth.sso/Login',
'idp_logout' => '/Shibboleth.sso/Logout',
'idp_logout' => '/Shibboleth.sso/Logout?return='.env('LOGOUT_URL'),
'authenticated' => '/',

/*
Expand Down
1 change: 1 addition & 0 deletions stubs/resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const vuetifyOptions = {};
Vue.use(Vuetify);

Vue.component('user-impersonate', require('./pages/user/Index.vue').default);
Vue.component('user-feedback', require('./pages/feedback/Index.vue').default);

const app = new Vue({
el: '#app',
Expand Down
37 changes: 37 additions & 0 deletions stubs/resources/js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
window._ = require('lodash');

/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/

window.axios = require('axios');

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

let token = document.head.querySelector('meta[name="csrf-token"]');

if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}


/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/

// import Echo from 'laravel-echo';

// window.Pusher = require('pusher-js');

// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });
19 changes: 19 additions & 0 deletions stubs/resources/views/help/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<x-app-layout>

<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Help') }}
</h2>
</x-slot>

<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="p-5 text-center bg-white overflow-hidden shadow-xl sm:rounded-lg">
<div class="text-4xl font-bold ">Let us help you!</div>
<p class="text-gray-600 font-normal">
Please contact <a class="inline-block rounded-lg bg-indigo-100 hover:bg-indigo-200 text-indigo-600 px-1 py-2" href="mailto:techsupport@uis.edu?subject={{ env('APP_NAME') }} Help">techsupport@uis.edu</a>
</p>
</div>
</div>
</div>
</x-app-layout>
9 changes: 5 additions & 4 deletions stubs/routes/web.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<?php

use App\Http\Controllers\UserController;
use Illuminate\Support\Facades\Route;

Route::get('/login', ['uses' => '\StudentAffairsUwm\Shibboleth\Controllers\ShibbolethController@login', 'as' => 'login']);

Route::middleware(['auth:web', 'impersonate:web'])->group(function() {
Route::view('/','home')->name('home');

Route::get('/user/impersonate-stop', [UserController::class, 'stopImpersonate'])
Route::get('/user/impersonate-stop', 'UserController@stopImpersonate')
->name('user.impersonatestop');

Route::get('/user/{user}/impersonate/', [UserController::class, 'impersonateUser'])
Route::get('/user/{user}/impersonate/', 'UserController@impersonateUser')
->name('user.impersonate');

Route::resource('/user', UserController::class);
Route::resource('/user', 'UserController');

Route::view('/feedback', 'feedback.index');

Route::view('/help', 'help.index');
});

0 comments on commit f3f9e7c

Please sign in to comment.