(Grav GitSync) Automatic Commit from buha
This commit is contained in:
parent
5126f20adf
commit
c152a55277
|
@ -0,0 +1,3 @@
|
|||
.idea
|
||||
.DS_Store
|
||||
node_modules
|
|
@ -1,3 +1,10 @@
|
|||
# v1.3.3
|
||||
## 01/04/2023
|
||||
|
||||
1. [](#improved)
|
||||
* Save `post-save` action to session
|
||||
* Set default `post-save` action to `edit` for create and edit
|
||||
|
||||
# v1.3.2
|
||||
## 12/02/2022
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% set originalValue = value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
{% set isNew = key ? false : true %}
|
||||
{% set savedOption = grav.session.post_entries_save|default('create-new') %}
|
||||
{% set savedOption = grav.session.post_entries_save|default('edit') %}
|
||||
|
||||
{% if isNew %}
|
||||
{% set options = {'create-new':'PLUGIN_FLEX_OBJECTS.ACTION.CREATE_NEW', 'edit':'PLUGIN_FLEX_OBJECTS.ACTION.EDIT_ITEM', 'list':'PLUGIN_FLEX_OBJECTS.ACTION.LIST_ITEMS'} %}
|
||||
|
@ -12,7 +12,6 @@
|
|||
{% endif %}
|
||||
|
||||
{% block input %}
|
||||
{% set savedOption = not isNew and savedOption == 'create-new' ? 'edit' : savedOption %}
|
||||
{% for key, text in options %}
|
||||
{% set id = field.id|default(field.name) ~ '-' ~ key %}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Flex Objects
|
||||
slug: flex-objects
|
||||
type: plugin
|
||||
version: 1.3.2
|
||||
version: 1.3.3
|
||||
description: Flex Objects plugin allows you to manage Flex Objects in Grav Admin.
|
||||
icon: list-alt
|
||||
author:
|
||||
|
|
|
@ -907,6 +907,7 @@ class AdminController
|
|||
// Set route to point to the current page.
|
||||
if (!$this->redirect) {
|
||||
$postAction = $request->getParsedBody()['_post_entries_save'] ?? 'edit';
|
||||
$this->grav['session']->post_entries_save = $postAction;
|
||||
if ($postAction === 'create-new') {
|
||||
// Create another.
|
||||
$route = $this->referrerRoute->withGravParam('action', null)->withGravParam('', 'add');
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
.idea
|
||||
.DS_Store
|
|
@ -1,3 +1,10 @@
|
|||
# v3.7.2
|
||||
## 01/02/2023
|
||||
|
||||
1. [](#new)
|
||||
* Added new `onBeforeSessionStart()` event to store redirect + messages when session is regenerated during login
|
||||
* Requires Grav `1.7.38` for new event availability
|
||||
|
||||
# v3.7.1
|
||||
## 06/14/2022
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Login
|
||||
slug: login
|
||||
type: plugin
|
||||
version: 3.7.1
|
||||
version: 3.7.2
|
||||
testing: false
|
||||
description: Enables user authentication and login screen.
|
||||
icon: sign-in
|
||||
|
@ -15,7 +15,7 @@ bugs: https://github.com/getgrav/grav-plugin-login/issues
|
|||
license: MIT
|
||||
|
||||
dependencies:
|
||||
- { name: grav, version: '>=1.7.32' }
|
||||
- { name: grav, version: '>=1.7.38' }
|
||||
- { name: form, version: '>=6.0.0' }
|
||||
- { name: email, version: '>=3.1.6' }
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"project":"grav-plugin-login",
|
||||
"platforms":{
|
||||
"grav":{
|
||||
"nodes":{
|
||||
"plugin":[
|
||||
{
|
||||
"source":"/",
|
||||
"destination":"/user/plugins/login"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ use Grav\Common\User\Interfaces\UserCollectionInterface;
|
|||
use Grav\Common\User\Interfaces\UserInterface;
|
||||
use Grav\Common\Utils;
|
||||
use Grav\Common\Uri;
|
||||
use Grav\Events\BeforeSessionStartEvent;
|
||||
use Grav\Events\PluginsLoadedEvent;
|
||||
use Grav\Events\SessionStartEvent;
|
||||
use Grav\Framework\Flex\Interfaces\FlexCollectionInterface;
|
||||
|
@ -62,6 +63,9 @@ class LoginPlugin extends Plugin
|
|||
/** @var Invitation|null */
|
||||
protected $invitation;
|
||||
|
||||
protected $temp_redirect;
|
||||
protected $temp_messages;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@ -70,6 +74,7 @@ class LoginPlugin extends Plugin
|
|||
return [
|
||||
PluginsLoadedEvent::class => [['onPluginsLoaded', 10]],
|
||||
SessionStartEvent::class => ['onSessionStart', 0],
|
||||
BeforeSessionStartEvent::class => ['onBeforeSessionStart', 0],
|
||||
PageAuthorizeEvent::class => ['onPageAuthorizeEvent', -10000],
|
||||
'onPluginsInitialized' => [['initializeSession', 10000], ['initializeLogin', 1000]],
|
||||
'onTask.login.login' => ['loginController', 0],
|
||||
|
@ -124,6 +129,18 @@ class LoginPlugin extends Plugin
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BeforeSessionStartEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function onBeforeSessionStart(BeforeSessionStartEvent $event): void
|
||||
{
|
||||
$session = $event->session;
|
||||
$this->temp_redirect = $session->redirect_after_login ?? null;
|
||||
$this->temp_messages = $session->messages;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param SessionStartEvent $event
|
||||
* @return void
|
||||
|
@ -132,6 +149,15 @@ class LoginPlugin extends Plugin
|
|||
{
|
||||
$session = $event->session;
|
||||
|
||||
if (isset($this->temp_redirect)) {
|
||||
$session->redirect_after_login = $this->temp_redirect;
|
||||
unset($this->temp_redirect);
|
||||
}
|
||||
if (isset($this->temp_messages)) {
|
||||
$session->messages = $this->temp_messages;
|
||||
unset($this->temp_messages);
|
||||
}
|
||||
|
||||
$user = $session->user ?? null;
|
||||
if ($user && $user->exists() && ($this->config()['session_user_sync'] ?? false)) {
|
||||
// User is stored into the filesystem.
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
composer.lock
|
||||
vendor
|
||||
nbproject
|
||||
.idea
|
||||
.buildpath
|
||||
.project
|
||||
.DS_Store
|
||||
.*.sw*
|
||||
.*.un~
|
|
@ -0,0 +1,14 @@
|
|||
language: php
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- hhvm
|
||||
|
||||
install:
|
||||
- travis_retry composer install --no-interaction
|
||||
- composer info -i
|
||||
|
||||
script: vendor/bin/phpunit --bootstrap tests/bootstrap.php --configuration tests/phpunit.xml tests
|
|
@ -0,0 +1,4 @@
|
|||
.idea
|
||||
nbproject
|
||||
example/tokens
|
||||
/vendor/
|
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Authenticator.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Authenticator.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Cookie.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Cookie.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Storage/DB.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Storage/DB.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Storage/PDO.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Storage/PDO.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Storage/StorageInterface.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/src/Rememberme/Storage/StorageInterface.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/test/RemembermeTest.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/test/RemembermeTest.php
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/test/Storage/tokens.xml
vendored
Executable file → Normal file
0
plugins/login/vendor/birke/rememberme/test/Storage/tokens.xml
vendored
Executable file → Normal file
|
@ -0,0 +1,3 @@
|
|||
/composer.lock
|
||||
/phpunit.xml
|
||||
/vendor/
|
|
@ -0,0 +1,41 @@
|
|||
sudo: false
|
||||
|
||||
language: php
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.local
|
||||
- vendor
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.1
|
||||
env:
|
||||
- EXECUTE_CS_CHECK=true
|
||||
- EXECUTE_TEST_COVERALLS=true
|
||||
- PATH="$HOME/.local/bin:$PATH"
|
||||
- php: nightly
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
before_install:
|
||||
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
|
||||
- composer self-update
|
||||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:dev-master ; fi
|
||||
|
||||
install:
|
||||
- travis_retry composer install --no-interaction
|
||||
- composer info -i
|
||||
|
||||
script:
|
||||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi
|
||||
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then vendor/bin/phpunit ; fi
|
||||
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then vendor/bin/phpcs ; fi
|
||||
|
||||
after_script:
|
||||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/coveralls ; fi
|
||||
|
||||
notifications:
|
||||
email: true
|
30
plugins/login/vendor/robthree/twofactorauth/.github/workflows/test-bacon.yml
vendored
Normal file
30
plugins/login/vendor/robthree/twofactorauth/.github/workflows/test-bacon.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Test Bacon QR Code Provider
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: composer
|
||||
coverage: xdebug
|
||||
ini-values: error_reporting=E_ALL
|
||||
|
||||
- uses: ramsey/composer-install@v1
|
||||
|
||||
- run: composer require bacon/bacon-qr-code
|
||||
|
||||
- run: composer lint
|
||||
- run: composer test testsDependency/BaconQRCodeTest.php
|
46
plugins/login/vendor/robthree/twofactorauth/.github/workflows/test-endroid.yml
vendored
Normal file
46
plugins/login/vendor/robthree/twofactorauth/.github/workflows/test-endroid.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: Test Endroid QR Code Provider
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1']
|
||||
endroid-version: ["^4"]
|
||||
include:
|
||||
- php-version: 5.6
|
||||
# earliest supported version
|
||||
endroid-version: 2.2.1
|
||||
- php-version: 7.0
|
||||
endroid-version: 2.5.1
|
||||
- php-version: 7.1
|
||||
# this version is 7.1+
|
||||
endroid-version: 3.0.0
|
||||
- php-version: 7.2
|
||||
# all later versions are 7.3+
|
||||
endroid-version: 3.5.9
|
||||
- php-version: 7.3
|
||||
endroid-version: 3.9.7
|
||||
- php-version: 7.4
|
||||
endroid-version: 4.0.0
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: composer
|
||||
coverage: xdebug
|
||||
ini-values: error_reporting=E_ALL
|
||||
|
||||
- uses: ramsey/composer-install@v1
|
||||
|
||||
- run: composer require endroid/qrcode:${{ matrix.endroid-version }}
|
||||
|
||||
- run: composer test testsDependency/EndroidQRCodeTest.php
|
|
@ -0,0 +1,28 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: composer
|
||||
coverage: xdebug
|
||||
ini-values: error_reporting=E_ALL
|
||||
|
||||
- uses: ramsey/composer-install@v1
|
||||
|
||||
- run: composer lint
|
||||
- run: composer test
|
|
@ -0,0 +1,192 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Roslyn cache directories
|
||||
*.ide/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
#NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding addin-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# If using the old MSBuild-Integrated Package Restore, uncomment this:
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# Composer
|
||||
/vendor
|
||||
composer.lock
|
||||
|
||||
# .vs
|
||||
.vs/
|
||||
|
||||
.phpunit.result.cache
|
0
plugins/login/vendor/robthree/twofactorauth/lib/Providers/Qr/EndroidQrCodeProvider.php
vendored
Executable file → Normal file
0
plugins/login/vendor/robthree/twofactorauth/lib/Providers/Qr/EndroidQrCodeProvider.php
vendored
Executable file → Normal file
0
plugins/login/vendor/robthree/twofactorauth/lib/Providers/Qr/EndroidQrCodeWithLogoProvider.php
vendored
Executable file → Normal file
0
plugins/login/vendor/robthree/twofactorauth/lib/Providers/Qr/EndroidQrCodeWithLogoProvider.php
vendored
Executable file → Normal file
Loading…
Reference in New Issue