Skip to content

Commit 06f182b

Browse files
committed
Merge branch 'dev'
2 parents 1296282 + 1fecedc commit 06f182b

15 files changed

Lines changed: 122 additions & 161 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<a name="1.2.0"></a>
2+
# [1.2.0](https://github.com/flextype-plugins/accounts-admin) (2020-08-05)
3+
4+
### Features
5+
6+
* **core** update code base for new Flextype 0.9.9
7+
8+
### Bug Fixes
9+
10+
* **core** fix cache issue on registration
11+
112
<a name="1.1.2"></a>
213
# [1.1.2](https://github.com/flextype-plugins/accounts-admin) (2020-06-24)
314

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="center">Accounts Admin Plugin for <a href="http://flextype.org/">Flextype</a></h1>
22

33
<p align="center">
4-
<a href="https://github.com/flextype-plugins/accounts-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/accounts-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/accounts-admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.8-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-accounts-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-accounts-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/accounts-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/accounts-admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
4+
<a href="https://github.com/flextype-plugins/accounts-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/accounts-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/accounts-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/accounts-admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.9-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-accounts-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-accounts-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/accounts-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/accounts-admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
55
</p>
66

77
Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
@@ -12,7 +12,7 @@ The following dependencies need to be installed for Accounts Admin Plugin.
1212

1313
| Item | Version | Download |
1414
|---|---|---|
15-
| [flextype](https://github.com/flextype/flextype) | 0.9.8 | [download](https://github.com/flextype/flextype/releases) |
15+
| [flextype](https://github.com/flextype/flextype) | 0.9.9 | [download](https://github.com/flextype/flextype/releases) |
1616
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
1717
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
1818
| [form-admin](https://github.com/flextype-plugins/form-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/form-admin/releases) |

app/Controllers/AccountsAdminController.php

Lines changed: 92 additions & 77 deletions
Large diffs are not rendered by default.

bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* file that was distributed with this source code.
1212
*/
1313

14-
namespace Flextype;
14+
namespace Flextype\Plugin\AccountsAdmin;
1515

1616
use function is_file;
1717

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
},
2828
"autoload": {
2929
"classmap": [
30-
"app",
31-
"middlewares"
30+
"app"
3231
]
3332
}
3433
}

dependencies.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Flextype;
12+
namespace Flextype\Plugin\AccountsAdmin;
1313

14+
use Flextype\Plugin\AccountsAdmin\Controllers\AccountsAdminController;
1415
use Slim\Flash\Messages;
1516
use Flextype\Component\I18n\I18n;
1617
use function Flextype\Component\I18n\__;

middlewares/AccountsIsSupperAdminRegisteredMiddleware.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Accounts Admin
2-
version: 1.1.2
2+
version: 1.2.0
33
description: Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
44
icon: fas fa-users
55
author:
@@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/accounts-admin/issues
1111
license: MIT
1212

1313
dependencies:
14-
flextype: 0.9.8
14+
flextype: 0.9.9
1515
twig: '>=1.0.0'
1616
admin: '>=1.0.0'
1717
form: '>=1.0.0'

routes/web.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
declare(strict_types=1);
44

5-
namespace Flextype;
5+
use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInMiddleware;
6+
use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInRolesInMiddleware;
67

78
$app->group('/' . $admin_route . '/accounts', function () use ($app, $flextype) {
89
$app->get('/login', 'AccountsAdminController:login')->setName('admin.accounts.login');
910
$app->post('/login', 'AccountsAdminController:loginProcess')->setName('admin.accounts.loginProcess');
1011
$app->get('/reset-password', 'AccountsAdminController:resetPassword')->setName('admin.accounts.resetPassword');
1112
$app->post('/reset-password', 'AccountsAdminController:resetPasswordProcess')->setName('admin.accounts.resetPasswordProcess');
1213
$app->get('/new-password/{email}/{hash}', 'AccountsAdminController:newPasswordProcess')->setName('admin.accounts.newPasswordProcess');
13-
$app->get('/registration', 'AccountsAdminController:registration')->setName('admin.accounts.registration')->add(new AccountsIsSupperAdminRegisteredMiddleware(['container' => $flextype, 'redirect' => 'admin.accounts.login']));
14-
$app->post('/registration', 'AccountsAdminController:registrationProcess')->setName('admin.accounts.registrationProcess')->add(new AccountsIsSupperAdminRegisteredMiddleware(['container' => $flextype, 'redirect' => 'admin.accounts.login']));
14+
$app->get('/registration', 'AccountsAdminController:registration')->setName('admin.accounts.registration');
15+
$app->post('/registration', 'AccountsAdminController:registrationProcess')->setName('admin.accounts.registrationProcess');
1516
})->add('csrf');
1617

1718
$app->group('/' . $admin_route . '/accounts', function () use ($app, $flextype) {
@@ -27,10 +28,3 @@
2728
'redirect' => ($flextype->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'),
2829
'roles' => 'admin']))
2930
->add('csrf');
30-
31-
32-
$app->group('/' . $admin_route . '/accounts', function () use ($app, $flextype) : void {
33-
$app->get('/no-access', function($request, $response, $args) {
34-
return $response->write("You have no access to this page.");
35-
})->setName('admin.accounts.no-access');
36-
});

templates/add.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "plugins/accounts-admin/templates/partials/base.html" %}
22

33
{% block content %}
4-
{{ form.render(serializer_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-add.yaml'), 'yaml'), {})|raw }}
4+
{{ form.render(yaml_decode(filesystem_read(PATH_PROJECT ~ '/fieldsets/accounts-admin-add.yaml')), {})|raw }}
55
{% endblock %}

0 commit comments

Comments
 (0)