Allow the Terms and Conditions to be set as URLs

Cleanup the old TaC pages
Update the dependencies
This commit is contained in:
Timothée Jaussoin 2021-02-09 13:58:32 +01:00
parent b6959cc5dd
commit e98e0bf003
9 changed files with 24 additions and 40 deletions

View file

@ -22,6 +22,9 @@ NEWSLETTER_REGISTRATION_ADDRESS= # Address to contact when a user wants to regis
PHONE_AUTHENTICATION=true # Toggle to enable/disable the SMS support
DEVICES_MANAGEMENT=false # Toggle to enable/disable the devices management support
TERMS_OF_USE_URL= # A URL pointing to the Terms of Use
PRIVACY_POLICY_URL= # A URL pointing to the Privacy Policy
LOG_CHANNEL=stack
# Local FlexiAPI database

View file

@ -46,16 +46,6 @@ class AccountController extends Controller
]);
}
public function terms(Request $request)
{
return view('account.terms');
}
public function privacy(Request $request)
{
return view('account.privacy');
}
public function delete(Request $request)
{
return view('account.delete', [

30
flexiapi/composer.lock generated
View file

@ -577,16 +577,16 @@
},
{
"name": "giggsey/libphonenumber-for-php",
"version": "8.12.17",
"version": "8.12.18",
"source": {
"type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
"reference": "d914436bd646e9d645e7f8ac6644bf7e33a023d4"
"reference": "2d50e0aea1f70508b39a3d22c62d24d66d532ed2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/d914436bd646e9d645e7f8ac6644bf7e33a023d4",
"reference": "d914436bd646e9d645e7f8ac6644bf7e33a023d4",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/2d50e0aea1f70508b39a3d22c62d24d66d532ed2",
"reference": "2d50e0aea1f70508b39a3d22c62d24d66d532ed2",
"shasum": ""
},
"require": {
@ -646,7 +646,7 @@
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
"source": "https://github.com/giggsey/libphonenumber-for-php"
},
"time": "2021-01-27T19:06:58+00:00"
"time": "2021-02-08T10:31:32+00:00"
},
{
"name": "giggsey/locale",
@ -1683,16 +1683,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.44.0",
"version": "2.45.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "e6ef33cb1f67a4bed831ed6d0f7e156739a5d8cd"
"reference": "e2ba3174ce869da1713c38340dbb36572dfacd5a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e6ef33cb1f67a4bed831ed6d0f7e156739a5d8cd",
"reference": "e6ef33cb1f67a4bed831ed6d0f7e156739a5d8cd",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e2ba3174ce869da1713c38340dbb36572dfacd5a",
"reference": "e2ba3174ce869da1713c38340dbb36572dfacd5a",
"shasum": ""
},
"require": {
@ -1772,7 +1772,7 @@
"type": "tidelift"
}
],
"time": "2021-01-26T20:46:41+00:00"
"time": "2021-02-07T21:35:59+00:00"
},
{
"name": "nikic/php-parser",
@ -5320,16 +5320,16 @@
},
{
"name": "facade/ignition",
"version": "2.5.10",
"version": "2.5.11",
"source": {
"type": "git",
"url": "https://github.com/facade/ignition.git",
"reference": "98154e8b991fb616304c213cd405299ffedc26f5"
"reference": "e91d67353054bf827c64687fcac5ea44e4dcec54"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/ignition/zipball/98154e8b991fb616304c213cd405299ffedc26f5",
"reference": "98154e8b991fb616304c213cd405299ffedc26f5",
"url": "https://api.github.com/repos/facade/ignition/zipball/e91d67353054bf827c64687fcac5ea44e4dcec54",
"reference": "e91d67353054bf827c64687fcac5ea44e4dcec54",
"shasum": ""
},
"require": {
@ -5393,7 +5393,7 @@
"issues": "https://github.com/facade/ignition/issues",
"source": "https://github.com/facade/ignition"
},
"time": "2021-02-02T10:15:48+00:00"
"time": "2021-02-05T12:52:11+00:00"
},
{
"name": "facade/ignition-contracts",

View file

@ -17,6 +17,9 @@ return [
'sip_domain' => env('APP_SIP_DOMAIN', 'sip.domain.com'),
'flexisip_proxy_pid' => env('APP_FLEXISIP_PROXY_PID', '/var/run/flexisip-proxy.pid'),
'terms_of_use_url' => env('TERMS_OF_USE_URL', ''),
'privacy_policy_url' => env('PRIVACY_POLICY_URL', ''),
'newsletter_registration_address' => env('NEWSLETTER_REGISTRATION_ADDRESS', ''),
'phone_authentication' => env('PHONE_AUTHENTICATION', true),
'devices_management' => env('DEVICES_MANAGEMENT', false),

View file

@ -1,5 +0,0 @@
@extends('layouts.main')
@section('content')
<h1>Privacy policy</h1>
@endsection

View file

@ -1,5 +0,0 @@
@extends('layouts.main')
@section('content')
<h1>Terms and conditions</h1>
@endsection

View file

@ -1,13 +1,13 @@
<div class="form-check mb-3">
{!! Form::checkbox('terms', 'true', false, ['class' => 'form-check-input', 'id' => 'terms']) !!}
<label class="form-check-label" for="terms">I accept the Terms and Conditions: </a></label>
<p>Read the <a href="{{ route('account.terms') }}">Terms and Conditions</a></p>
<p>Read the <a href="{{ config('app.terms_of_use_url') }}">Terms and Conditions</a></p>
</div>
<div class="form-check mb-3">
{!! Form::checkbox('privacy', 'true', false, ['class' => 'form-check-input', 'id' => 'privacy']) !!}
<label class="form-check-label" for="privacy">I accept the Privacy policy: </a></label>
<p>Read the <a href="{{ route('account.privacy') }}">Privacy policy</a></p>
<p>Read the <a href="{{ config('app.privacy_policy_url') }}">Privacy policy</a></p>
</div>
@include('parts.captcha')

View file

@ -20,8 +20,6 @@
//Route::get('/', 'HomeController@index')->name('home');
Route::get('/', 'Account\AccountController@home')->name('account.home');
Route::get('terms', 'Account\AccountController@terms')->name('account.terms');
Route::get('privacy', 'Account\AccountController@privacy')->name('account.privacy');
Route::get('login', 'Account\AuthenticateController@login')->name('account.login');
Route::post('authenticate', 'Account\AuthenticateController@authenticate')->name('account.authenticate');

View file

@ -8,7 +8,7 @@
#%define _datadir %{_datarootdir}
#%define _docdir %{_datadir}/doc
%define build_number 45
%define build_number 46
%define var_dir /var/opt/belledonne-communications
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
%define env_file "$RPM_BUILD_ROOT/etc/flexisip-account-manager/flexiapi.env"