mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
fix auth
This commit is contained in:
parent
354ffb0a50
commit
1502781aae
@ -35,10 +35,6 @@ class MyProfileController extends PublicController
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
if (!Auth::user()) {
|
|
||||||
redirect('/login?redirect=' . url()->current())->send();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->adressRepository = $adressRepository;
|
$this->adressRepository = $adressRepository;
|
||||||
$this->userRepository = $userRepository;
|
$this->userRepository = $userRepository;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,44 +46,72 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
|
|||||||
// MyProfileController
|
// MyProfileController
|
||||||
'profile/ads' => [
|
'profile/ads' => [
|
||||||
'as' => 'profile::ads',
|
'as' => 'profile::ads',
|
||||||
|
'middleware' => 'auth',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@myAds'
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@myAds'
|
||||||
],
|
],
|
||||||
'profile/adress/ajaxCreate' => [
|
'profile/adress/ajaxCreate' => [
|
||||||
'as' => 'visiosoft.module.profile::adress_ajax_create',
|
'as' => 'visiosoft.module.profile::adress_ajax_create',
|
||||||
|
'middleware' => 'auth',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxCreate'
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxCreate'
|
||||||
],
|
],
|
||||||
'profile/adress/ajaxUpdate/{id}' => [
|
'profile/adress/ajaxUpdate/{id}' => [
|
||||||
'as' => 'visiosoft.module.profile::adress_ajax_update',
|
'as' => 'visiosoft.module.profile::adress_ajax_update',
|
||||||
|
'middleware' => 'auth',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxUpdate'
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxUpdate'
|
||||||
],
|
],
|
||||||
'profile/adress/ajaxDetail' => [
|
'profile/adress/ajaxDetail' => [
|
||||||
'as' => 'visiosoft.module.profile::adress_ajax_detail',
|
'as' => 'visiosoft.module.profile::adress_ajax_detail',
|
||||||
|
'middleware' => 'auth',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxDetail'
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxDetail'
|
||||||
],
|
],
|
||||||
'profile' => [
|
'profile' => [
|
||||||
'as' => 'profile::profile',
|
'as' => 'profile::profile',
|
||||||
|
'middleware' => 'auth',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@home'
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@home'
|
||||||
],
|
],
|
||||||
'profile/detail' => [
|
'profile/detail' => [
|
||||||
'as' => 'profile::detail',
|
'as' => 'profile::detail',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@detail'
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@detail'
|
||||||
],
|
],
|
||||||
'profile/password' => [
|
'profile/password' => [
|
||||||
'as' => 'profile::password',
|
'as' => 'profile::password',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@password'
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@password'
|
||||||
],
|
],
|
||||||
'profile/class/status/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@statusAds',
|
'profile/class/status/{id},{type}' => [
|
||||||
'profile/class/extendTime/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@extendAds',
|
'middleware' => 'auth',
|
||||||
'profile/message/show/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@showMessage',
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@statusAds',
|
||||||
|
],
|
||||||
|
'profile/class/extendTime/{id},{type}' => [
|
||||||
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@extendAds',
|
||||||
|
],
|
||||||
|
'profile/message/show/{id}' => [
|
||||||
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@showMessage',
|
||||||
|
],
|
||||||
'profile/close-account' => [
|
'profile/close-account' => [
|
||||||
'middleware' => 'auth',
|
'middleware' => 'auth',
|
||||||
'as' => 'visiosoft.module.profile::profile_close_account',
|
'as' => 'visiosoft.module.profile::profile_close_account',
|
||||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@disableAccount'
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@disableAccount'
|
||||||
],
|
],
|
||||||
'profile/notification' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@notification',
|
'profile/notification' => [
|
||||||
'ajax/update-user-info' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@updateAjaxProfile',
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@notification',
|
||||||
'api/changeEducation' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@changeEducation',
|
'middleware' => 'auth',
|
||||||
'api/getEducation' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@getEducation',
|
],
|
||||||
|
'ajax/update-user-info' => [
|
||||||
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@updateAjaxProfile',
|
||||||
|
],
|
||||||
|
'api/changeEducation' => [
|
||||||
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@changeEducation',
|
||||||
|
],
|
||||||
|
'api/getEducation' => [
|
||||||
|
'middleware' => 'auth',
|
||||||
|
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@getEducation',
|
||||||
|
],
|
||||||
|
|
||||||
// UserAuthenticator
|
// UserAuthenticator
|
||||||
'login-in' => 'Visiosoft\ProfileModule\Http\Controller\UserAuthenticator@attempt',
|
'login-in' => 'Visiosoft\ProfileModule\Http\Controller\UserAuthenticator@attempt',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user