diff --git a/cp/app/Controllers/RegistrarsController.php b/cp/app/Controllers/RegistrarsController.php index 3cef757..39bad3e 100644 --- a/cp/app/Controllers/RegistrarsController.php +++ b/cp/app/Controllers/RegistrarsController.php @@ -6,6 +6,7 @@ use App\Models\RegistryTransaction; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Container\ContainerInterface; +use League\ISO3166\ISO3166; class RegistrarsController extends Controller { @@ -13,4 +14,19 @@ class RegistrarsController extends Controller { return view($response,'admin/registrars/index.twig'); } + + public function create(Request $request, Response $response) + { + if ($_SESSION["auth_roles"] != 0) { + return $response->withHeader('Location', '/dashboard')->withStatus(302); + } + + $iso3166 = new ISO3166(); + $countries = $iso3166->all(); + + // Default view for GET requests or if POST data is not set + return view($response,'admin/registrars/create.twig', [ + 'countries' => $countries, + ]); + } } \ No newline at end of file diff --git a/cp/resources/views/admin/registrars/create.twig b/cp/resources/views/admin/registrars/create.twig new file mode 100644 index 0000000..decc10d --- /dev/null +++ b/cp/resources/views/admin/registrars/create.twig @@ -0,0 +1,552 @@ +{% extends "layouts/app.twig" %} + +{% block title %}{{ __('Create Registrar') }}{% endblock %} + +{% block content %} +
+ + + +
+
+
+ +
+
+
Registrar Details
+
+
+ +
+
+ + + The official name of the registrar. +
+
+ + + Unique identifier assigned by IANA. +
+
+ + + Unique client identifier for the registrar. +
+
+ + + Short prefix code representing the registrar. +
+
+ + + Primary contact email of the registrar. +
+
+ + +
+
+ + + Address of the registrar's WHOIS server. +
+
+ + + Address of the registrar's RDAP server. +
+
+ + + Registrar's official website URL. +
+
+ + + Email address for reporting abuse. +
+
+ + + Phone number for reporting abuse. +
+
+
+
+
+
+ + +
+
+
Financial Information
+
+
+ +
+
+ + + Current balance in the registrar's account. +
+
+ + + Maximum credit limit for the registrar. +
+
+ + +
+
+ + + Credit threshold triggering alerts or actions. +
+
+ + + Type of threshold: fixed value or percentage. +
+
+
+
+
+
+ + +
+
+
Registrar Contacts
+ + +
+ +
+
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
IP Whitelisting
+

+ Whitelist IP addresses for secure access. Up to 5 IP addresses (IPv4 or IPv6) can be added. +

+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
Registrar User
+

+ Create a registrar user by specifying the username, email, and passwords for both EPP and panel access. +

+
+ + + + + + + + + + + + + + + + + +
UsernameEmailEPP User PasswordPanel User Password
+ + + + + + + +
+
+
+
+
+
+ + +
+
+
Operational Test and Evaluation (OTE)
+

+ Operational Test and Evaluation (OTE) assesses the functionality of EPP commands in a simulated environment, ensuring effective communication between the registrar's system and the registry. Below are key EPP commands and their test statuses: +

+
+ +
+
    +
  • + contact:create + Success +
  • +
  • + domain:check + Pending +
  • +
  • + domain:info + Failed +
  • +
  • + domain:renew + Success +
  • +
  • + domain:transfer + Pending +
  • +
+
+ + +
+
    +
  • + host:create + Success +
  • +
  • + host:info + Failed +
  • +
  • + contact:update + Pending +
  • +
  • + domain:delete + Success +
  • +
  • + poll:request + Pending +
  • +
+
+
+
+
+ +
+
+
+
+ + + +{% endblock %} \ No newline at end of file diff --git a/cp/resources/views/admin/registrars/index.twig b/cp/resources/views/admin/registrars/index.twig index 39c6754..d0f5757 100644 --- a/cp/resources/views/admin/registrars/index.twig +++ b/cp/resources/views/admin/registrars/index.twig @@ -20,11 +20,11 @@
- + Create Registrar - +
diff --git a/cp/resources/views/layouts/app.twig b/cp/resources/views/layouts/app.twig index 7b029be..9ab802c 100644 --- a/cp/resources/views/layouts/app.twig +++ b/cp/resources/views/layouts/app.twig @@ -148,7 +148,7 @@
-
  • +
  • {{ __('List Registrars') }} - + {{ __('Create Registrar') }} diff --git a/cp/routes/web.php b/cp/routes/web.php index 9bcf4f3..6f5709b 100644 --- a/cp/routes/web.php +++ b/cp/routes/web.php @@ -55,6 +55,7 @@ $app->group('', function ($route) { $route->get('/host/{domain}', HostsController::class . ':viewHost')->setName('viewHost'); $route->get('/registrars', RegistrarsController::class .':view')->setName('registrars'); + $route->map(['GET', 'POST'], '/registrar/create', RegistrarsController::class . ':create')->setName('registrarcreate'); $route->get('/users', UsersController::class .':view')->setName('users'); diff --git a/database/registry.mariadb.sql b/database/registry.mariadb.sql index d754711..b637a4c 100644 --- a/database/registry.mariadb.sql +++ b/database/registry.mariadb.sql @@ -100,9 +100,9 @@ CREATE TABLE IF NOT EXISTS `registry`.`registrar_contact` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `registrar_id` int(10) unsigned NOT NULL, `type` enum('owner','admin','billing','tech','abuse') NOT NULL default 'admin', - `title` varchar(255) NOT NULL, + `title` varchar(255) default NULL, `first_name` varchar(255) NOT NULL, - `middle_name` varchar(255) NOT NULL, + `middle_name` varchar(255) default NULL, `last_name` varchar(255) NOT NULL, `org` varchar(255) default NULL, `street1` varchar(255) default NULL, diff --git a/database/registry.postgres.sql b/database/registry.postgres.sql index 65f984f..ff63277 100644 --- a/database/registry.postgres.sql +++ b/database/registry.postgres.sql @@ -109,9 +109,9 @@ CREATE TABLE registry.registrar_contact ( "id" serial8, "registrar_id" int CHECK ("registrar_id" >= 0) NOT NULL, "type" varchar CHECK ("type" IN ( 'owner','admin','billing','tech','abuse' )) NOT NULL default 'admin', - "title" varchar(255) NOT NULL, + "title" varchar(255) default NULL, "first_name" varchar(255) NOT NULL, - "middle_name" varchar(255) NOT NULL, + "middle_name" varchar(255) default NULL, "last_name" varchar(255) NOT NULL, "org" varchar(255) default NULL, "street1" varchar(255) default NULL,