mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Set the same behavior between API and the main form, same username between different domains are allowed
Bump package number
This commit is contained in:
parent
e98e0bf003
commit
68f325f2fd
2 changed files with 11 additions and 2 deletions
|
|
@ -22,10 +22,12 @@ namespace App\Http\Controllers\Api\Admin;
|
|||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Carbon\Carbon;
|
||||
|
||||
use App\Account;
|
||||
use App\Password;
|
||||
use App\Rules\WithoutSpaces;
|
||||
use App\Helpers\Utils;
|
||||
use App\Http\Controllers\Account\AuthenticateController as WebAuthenticateController;
|
||||
|
||||
|
|
@ -68,7 +70,14 @@ class AccountController extends Controller
|
|||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'username' => 'required|unique:external.accounts,username|filled',
|
||||
'username' => [
|
||||
'required',
|
||||
Rule::unique('external.accounts', 'username')->where(function ($query) use ($request) {
|
||||
$query->where('domain', config('app.sip_domain'));
|
||||
}),
|
||||
'filled',
|
||||
new WithoutSpaces
|
||||
],
|
||||
'algorithm' => 'required|in:SHA-256,MD5',
|
||||
'password' => 'required|filled',
|
||||
'domain' => 'min:3',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#%define _datadir %{_datarootdir}
|
||||
#%define _docdir %{_datadir}/doc
|
||||
|
||||
%define build_number 46
|
||||
%define build_number 47
|
||||
%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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue