Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- '6.0'
- '7.0'
- 'releases/*'

jobs:
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Dotkernel Admin is an application (skeleton) intended for quickly setting up an
It's a fast and reliable way to manage records in your database with a simple table-based approach, and also to build reports and graphs to monitor your platform.
The many graphical components at your disposal ensure an intuitive user experience.

> Check out our [demo](https://admin6.dotkernel.net/).
> Check out our [demo](https://admin7.dotkernel.net/).
>
> Submit user `admin` and password `dotadmin` to authenticate yourself.

Expand All @@ -16,7 +16,8 @@ Documentation is available at: https://docs.dotkernel.org/admin-documentation/

| Branch | Release | PSR-11 | OSS Lifecycle | PHP Version |
|--------|----------|--------|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| 6.0 | `>= 6.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/6.2.0) |
| 7.0 | `>= 7.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F7.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/7.0.0) |
| 6.0 | `< 7.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/6.2.0) |
| 5.0 | `< 6.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F5.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/5.0.3) |
| 4.0 | `< 5.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F4.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/4.3.1) |
| 3.0 | `< 4.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F3.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/3.2.1) |
Expand All @@ -29,12 +30,12 @@ Documentation is available at: https://docs.dotkernel.org/admin-documentation/
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/admin)](https://github.com/dotkernel/admin/issues)
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/admin)](https://github.com/dotkernel/admin/network)
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/admin)](https://github.com/dotkernel/admin/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/admin)](https://github.com/dotkernel/admin/blob/6.0/LICENSE.md)
[![GitHub license](https://img.shields.io/github/license/dotkernel/admin)](https://github.com/dotkernel/admin/blob/7.0/LICENSE.md)

[![Build Static](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml/badge.svg?branch=6.0)](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml)
[![Build Static](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml/badge.svg?branch=7.0)](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/admin/graph/badge.svg?token=BQS43UWAM4)](https://codecov.io/gh/dotkernel/admin)
[![Qodana](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml/badge.svg?branch=6.0)](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml)
[![PHPStan](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml/badge.svg?branch=6.0)](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml)
[![Qodana](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml/badge.svg?branch=7.0)](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml)
[![PHPStan](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml/badge.svg?branch=7.0)](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml)

## Getting Started

Expand Down Expand Up @@ -242,7 +243,7 @@ php ./bin/clear-config-cache.php
Open a web browser and visit `http://localhost:8080/`.

You should see the **Dotkernel Admin** login page.
If you ran the migrations you will have an admin user in the database with the following credentials:
If you ran the migrations, you will have an admin user in the database with the following credentials:

* **Identity**: `admin`
* **Password**: `dotadmin`
Expand Down
20 changes: 7 additions & 13 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,29 @@

| Branch | OSS Lifecycle | PHP Version |
|--------|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| 7.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F7.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/7.0.0) |
| 6.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/6.2.0) |
| 5.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F5.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/5.0.3) |
| 4.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F4.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/4.3.1) |
| 3.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F3.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/3.2.1) |

## Reporting Potential Security Issues

If you have encountered a potential security vulnerability in this project,
please report it to us at <security@dotkernel.com>. We will work with you to
verify the vulnerability and patch it.
If you have encountered a potential security vulnerability in this project, please report it to us at <security@dotkernel.com>.
We will work with you to verify the vulnerability and patch it.

When reporting issues, please provide the following information:

- Component(s) affected
- A description indicating how to reproduce the issue
- A summary of the security vulnerability and impact

We request that you contact us via the email address above and give the
project contributors a chance to resolve the vulnerability and issue a new
release prior to any public exposure; this helps protect the project's
users, and provides them with a chance to upgrade and/or update in order to
protect their applications.
We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.

## Policy

If we verify a reported security vulnerability, our policy is:

- We will patch the current release branch, as well as the immediate prior minor
release branch.

- After patching the release branches, we will immediately issue new security
fix releases for each patched release branch.
- We will patch the current release branch, as well as the immediate prior minor release branch.
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.
14 changes: 0 additions & 14 deletions config/autoload/app.global.php

This file was deleted.

2 changes: 1 addition & 1 deletion config/autoload/cors.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
], // Custom headers
'allowed_max_age' => '600', // 10 minutes
'credentials_allowed' => true, // Allow cookies
'exposed_headers' => [], // Tell client that the API will always return this header
'exposed_headers' => [], // Tell the client that the API will always return this header
],
];
4 changes: 2 additions & 2 deletions config/autoload/dependencies.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

return [
// Provides application-wide services.
// We recommend using fully-qualified class names whenever possible as service names.
// We recommend using fully qualified class names whenever possible as service names.
'dependencies' => [
// Use 'aliases' to alias a service name to another service.
// The key is the alias name, the value is the service to which it points.
'aliases' => [
AuthorizationInterface::class => AuthorizationService::class,
],
// Use 'invokables' for constructor-less services, or services that do not require arguments to the constructor.
// Use 'invokables' for constructorless services, or services that do not require arguments to the constructor.
// Map a service name to the class name.
'invokables' => [
// Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class,
Expand Down
46 changes: 34 additions & 12 deletions config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,63 @@

declare(strict_types=1);

$appName = 'Dotkernel Admin v7';
$baseUrl = 'http://localhost:8080';

$databases = [
'default' => [
/**
* You can add more database connections to this array.
* Only one active connection is allowed at a time.
* By default, the application uses the 'mariadb' connection.
* You can switch to another connection by activating it under doctrine->connection->orm_default-->params.
*/
'mariadb' => [
'host' => 'localhost',
'dbname' => 'dotkernel',
'user' => '',
'password' => '',
'port' => 3306,
'driver' => 'pdo_mysql',
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_general_ci',
'collation' => 'utf8mb4_general_ci',
'table_prefix' => '',
],
'postgresql' => [
'host' => 'localhost',
'dbname' => 'dotkernel',
'user' => '',
'password' => '',
'port' => 5432,
'driver' => 'pdo_pgsql',
'collation' => 'utf8mb4_general_ci',
'table_prefix' => '',
],
// you can add more database connections to this array
];

return [
'application' => [
'name' => $app['name'] ?? '',
'url' => $baseUrl,
],
'routes' => [
'page' => [
'component' => 'components',
],
'name' => $appName,
'version' => 7.0,
'url' => $baseUrl,
],
'databases' => $databases,
'doctrine' => [
'connection' => [
'orm_default' => [
'params' => $databases['default'],
'params' => $databases['mariadb'],
// 'params' => $databases['postgresql'],
],
],
],
'routes' => [
'page' => [
'component' => 'components',
],
],
'twig' => [
'globals' => [
'appName' => $appName,
],
],
'uploads' => [
'user' => [
'url' => $baseUrl . '/uploads/user',
Expand Down
80 changes: 80 additions & 0 deletions config/autoload/mail.global.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?php

declare(strict_types=1);

return [
/**
* Dotkernel mail module configuration
* Note that many of these options can be set programmatically too, when sending mail messages actually that is
* what you'll usually do, these configs provide just defaults and options that remain the same for all mails
*/
'dot_mail' => [
//the key is the mail service name, this is the default one, which does not extend any configuration
'default' => [
//message configuration
'message_options' => [
//from email address of the email
'from' => '',
//from name to be displayed instead of from address
'from_name' => '',
//reply-to email address of the email
'reply_to' => '',
//replyTo name to be displayed instead of the address
'reply_to_name' => '',
//destination email address as string or a list of email addresses
'to' => [],
//copy destination addresses
'cc' => [],
//hidden copy destination addresses
'bcc' => [],
//email subject
'subject' => '',
//body options - content can be plain text, HTML
'body' => [
'content' => '',
'charset' => 'utf-8',
],
//attachments config
'attachments' => [
'files' => [],
'dir' => [
'iterate' => false,
'path' => 'data/mail/attachments',
'recursive' => false,
],
],
],
/**
* the mail transport to use can be any class implementing
* Symfony\Component\Mailer\Transport\TransportInterface
*
* for standard mail transports, you can use these aliases:
* - sendmail => Symfony\Component\Mailer\Transport\SendmailTransport
* - esmtp => Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport
*
* defaults to sendmail
**/
'transport' => 'sendmail',
//options that will be used only if esmtp adapter is used
'smtp_options' => [
//hostname or IP address of the mail server
'host' => '',
//port of the mail server - 587 or 465 for secure connections
'port' => 587,
'connection_config' => [
//the smtp authentication identity
'username' => '',
//the smtp authentication credential
'password' => '',
//to disable auto_tls set tls key to false
//it's not recommended to disable TLS while connecting to an SMTP server
'tls' => null,
],
],
],
// option to log the SENT emails
'log' => [
'sent' => getcwd() . '/log/mail/sent.log',
],
],
];
11 changes: 5 additions & 6 deletions config/autoload/mezzio.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
use Laminas\ConfigAggregator\ConfigAggregator;

return [
// Toggle the configuration cache. Set this to boolean false, or remove the
// directive, to disable configuration caching. Toggling development mode
// will also disable it by default; clear the configuration cache using
// `composer clear-config-cache`.
// Toggle the configuration cache.
// Set this to boolean false or remove the directive to disable configuration caching.
// Toggling development mode will also disable it by default;
// clear the configuration cache using `composer clear-config-cache`.
ConfigAggregator::ENABLE_CACHE => true,

// Enable debugging; typically used to provide debugging information within templates.
'debug' => false,
'mezzio' => [
// Provide templates for the error handling middleware to use when
// generating responses.
// Provide templates for the error handling middleware to use when generating responses.
'error_handler' => [
'template_404' => 'error::404',
'template_error' => 'error::error',
Expand Down
4 changes: 2 additions & 2 deletions config/autoload/navigation.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

return [
'dot_navigation' => [
//enable menu item active if any child is active
// enable menu item active if any child is active
'active_recursion' => true,
'containers' => [
'main_menu' => [
Expand Down Expand Up @@ -100,7 +100,7 @@
],
],
],
//register custom providers here
// register custom providers here
'provider_manager' => [],
],
];
6 changes: 3 additions & 3 deletions config/autoload/session.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
'dot_session' => [
/**
* Amount of seconds of inactivity for which the system will extend session.
* Number of seconds of inactivity for which the system will extend the session.
*
* While the difference between now and LAST_ACTIVITY stored in session is less than rememberMeInactive,
* the session will be extended => user will not be logged out due to inactivity.
Expand Down Expand Up @@ -48,7 +48,7 @@
'cookie_lifetime' => 3600 * 24 * 30,

/**
* Specifies path to set in the session cookie.
* Specifies a path to set in the session cookie.
*/
'cookie_path' => '/',

Expand All @@ -63,7 +63,7 @@
'cookie_secure' => false,

/**
* Specifies the name of the session which is used as cookie name.
* Specifies the name of the session which is used as a cookie name.
*/
'name' => 'ADMIN_SESSID',

Expand Down
6 changes: 2 additions & 4 deletions config/autoload/templates.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
RouteExtension::class,
TranslationExtension::class,
],
'globals' => [
'appName' => $app['name'] ?? '',
],
'globals' => [],
'optimizations' => -1,
'runtime_loaders' => [],
// 'timezone' => '',
'timezone' => 'UTC',
Comment thread
alexmerlin marked this conversation as resolved.
],
];
Loading