Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Aug 25, 2020
2 parents 96727e2 + f3e8949 commit 78cbdf4
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 130 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.4.0"></a>
# [1.4.0](https://github.com/flextype-plugins/accounts-admin) (2020-08-25)

### Features

* **core** update code base for new Flextype 0.9.11

<a name="1.3.0"></a>
# [1.3.0](https://github.com/flextype-plugins/accounts-admin) (2020-08-19)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Accounts Admin Plugin for <a href="http://flextype.org/">Flextype</a></h1>

<p align="center">
<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.10-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>
<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.11-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>
</p>

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

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.10 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.11 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
| [form-admin](https://github.com/flextype-plugins/form-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/form-admin/releases) |
Expand Down
204 changes: 102 additions & 102 deletions app/Controllers/AccountsAdminController.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Set base admin route
*/
$admin_route = $flextype->container('registry')->get('plugins.admin.settings.route');
$admin_route = flextype('registry')->get('plugins.admin.settings.route');

/**
* Ensure vendor libraries exist
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"issues": "https://github.com/flextype-plugins/accounts-admin/issues"
},
"require": {
"php": ">=7.2.0"
"php": ">=7.3.0"
},
"config": {
"apcu-autoloader": true,
"optimize-autoloader": true,
"platform": {
"php": "7.2.0"
"php": "7.3.0"
}
},
"autoload": {
Expand Down
6 changes: 3 additions & 3 deletions dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
use function Flextype\Component\I18n\__;

// Add Admin Navigation
$flextype->container('registry')->set('plugins.admin.settings.navigation.extends.accounts', ['title' => __('accounts_admin_accounts'),'icon' => 'fas fa-users', 'link' => $flextype->container('router')->pathFor('admin.accounts.index')]);
flextype('registry')->set('plugins.admin.settings.navigation.extends.accounts', ['title' => __('accounts_admin_accounts'),'icon' => 'fas fa-users', 'link' => flextype('router')->pathFor('admin.accounts.index')]);

/**
* Add Accounts Admin Controller to Flextype container
*/
$flextype->container()['AccountsAdminController'] = static function () use ($flextype) {
return new AccountsAdminController($flextype);
flextype()->container()['AccountsAdminController'] = static function () {
return new AccountsAdminController();
};
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Accounts Admin
version: 1.3.0
version: 1.4.0
description: Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
icon: fas fa-users
author:
Expand All @@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/accounts-admin/issues
license: MIT

dependencies:
flextype: 0.9.10
flextype: 0.9.11
twig: '>=1.0.0'
admin: '>=1.0.0'
form: '>=1.0.0'
Expand Down
36 changes: 18 additions & 18 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInMiddleware;
use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInRolesInMiddleware;

$flextype->group('/' . $admin_route . '/accounts', function () use ($flextype) {
$flextype->get('/login', 'AccountsAdminController:login')->setName('admin.accounts.login');
$flextype->post('/login', 'AccountsAdminController:loginProcess')->setName('admin.accounts.loginProcess');
$flextype->get('/reset-password', 'AccountsAdminController:resetPassword')->setName('admin.accounts.resetPassword');
$flextype->post('/reset-password', 'AccountsAdminController:resetPasswordProcess')->setName('admin.accounts.resetPasswordProcess');
$flextype->get('/new-password/{email}/{hash}', 'AccountsAdminController:newPasswordProcess')->setName('admin.accounts.newPasswordProcess');
$flextype->get('/registration', 'AccountsAdminController:registration')->setName('admin.accounts.registration');
$flextype->post('/registration', 'AccountsAdminController:registrationProcess')->setName('admin.accounts.registrationProcess');
flextype()->group('/' . $admin_route . '/accounts', function () {
flextype()->get('/login', 'AccountsAdminController:login')->setName('admin.accounts.login');
flextype()->post('/login', 'AccountsAdminController:loginProcess')->setName('admin.accounts.loginProcess');
flextype()->get('/reset-password', 'AccountsAdminController:resetPassword')->setName('admin.accounts.resetPassword');
flextype()->post('/reset-password', 'AccountsAdminController:resetPasswordProcess')->setName('admin.accounts.resetPasswordProcess');
flextype()->get('/new-password/{email}/{hash}', 'AccountsAdminController:newPasswordProcess')->setName('admin.accounts.newPasswordProcess');
flextype()->get('/registration', 'AccountsAdminController:registration')->setName('admin.accounts.registration');
flextype()->post('/registration', 'AccountsAdminController:registrationProcess')->setName('admin.accounts.registrationProcess');
})->add('csrf');

$flextype->group('/' . $admin_route . '/accounts', function () use ($flextype) {
$flextype->get('', 'AccountsAdminController:index')->setName('admin.accounts.index');
$flextype->get('/add', 'AccountsAdminController:add')->setName('admin.accounts.add');
$flextype->post('/add', 'AccountsAdminController:addProcess')->setName('admin.accounts.addProcess');
$flextype->get('/edit', 'AccountsAdminController:edit')->setName('admin.accounts.edit');
$flextype->post('/edit', 'AccountsAdminController:editProcess')->setName('admin.accounts.editProcess');
$flextype->post('/delete', 'AccountsAdminController:deleteProcess')->setName('admin.accounts.deleteProcess');
$flextype->post('/logout', 'AccountsAdminController:logoutProcess')->setName('admin.accounts.logoutProcess');
})->add(new AclIsUserLoggedInMiddleware($flextype, ['redirect' => 'admin.accounts.login']))
->add(new AclIsUserLoggedInRolesInMiddleware($flextype, ['redirect' => ($flextype->getContainer()->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'),
flextype()->group('/' . $admin_route . '/accounts', function () {
flextype()->get('', 'AccountsAdminController:index')->setName('admin.accounts.index');
flextype()->get('/add', 'AccountsAdminController:add')->setName('admin.accounts.add');
flextype()->post('/add', 'AccountsAdminController:addProcess')->setName('admin.accounts.addProcess');
flextype()->get('/edit', 'AccountsAdminController:edit')->setName('admin.accounts.edit');
flextype()->post('/edit', 'AccountsAdminController:editProcess')->setName('admin.accounts.editProcess');
flextype()->post('/delete', 'AccountsAdminController:deleteProcess')->setName('admin.accounts.deleteProcess');
flextype()->post('/logout', 'AccountsAdminController:logoutProcess')->setName('admin.accounts.logoutProcess');
})->add(new AclIsUserLoggedInMiddleware(['redirect' => 'admin.accounts.login']))
->add(new AclIsUserLoggedInRolesInMiddleware(['redirect' => (flextype()->getContainer()->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'),
'roles' => 'admin']))
->add('csrf');

0 comments on commit 78cbdf4

Please sign in to comment.