Commit Graph

208 Commits

Author SHA1 Message Date
Andy Miller
46106c1cae more validation for remove media 2018-10-04 16:30:07 -06:00
Matias Griese
ec93b823ca Use Url:post() to get the $_POST variable (allows common security checks/filtering for the POST data) 2018-09-17 09:54:27 +03:00
Matias Griese
eae4be651e Fire new OnAdminPage event only if user has been logged in 2018-09-05 11:23:15 +03:00
Matias Griese
551995a403 Require Grav 1.5.2 2018-08-29 15:48:08 +03:00
Matias Griese
842b4c5b0f Added new event onAdminPage which allows plugins to customize Page object in $event['page'] 2018-08-29 15:22:43 +03:00
Andy Miller
9a1dec55b8 Support force_ssl option in admin plugin #1479 2018-07-13 15:43:15 -06:00
Felix Eckhofer
d293534c3c Initialize session on setup (#1451)
This makes the plugin compatible with `system.session.initialize = false`
which makes it possible to have no session cookie (for frontend users)
while the admin login still works.
2018-06-08 21:43:02 +00:00
Matias Griese
5f375cacdd Add new twig variable: current_route 2018-05-23 22:33:08 +03:00
Matias Griese
15f4ae8b11 When creating first user, authorize against admin.login, not site.login 2018-05-23 09:11:30 +03:00
Andy Miller
43ffcbf7e3 check for blueprints method 2018-05-22 14:25:37 -06:00
Matias Griese
41565f83d9 Admin login now uses login plugin events (with option admin: true) 2018-05-10 20:04:14 +03:00
Matias Griese
59effd57af Moved 2FA authentication to login plugin 2018-05-10 10:34:56 +03:00
Matias Griese
12cf325518 Code cleanup 2018-05-10 10:14:18 +03:00
Ante Drnasin
7025f2fa2b Update admin.php (#1409)
Fix for https://github.com/getgrav/grav-plugin-admin/issues/1408
2018-04-02 06:38:33 -06:00
Andy Miller
77ecc1c62f Fix for bad redirect on simplesearch save (possibly others) 2018-04-01 10:19:11 -06:00
Djamil Legato
d53e5b111f Implemented Resize Media and Resolution ('resizeWidth', 'resizeHeight', 'resizeQuality', 'resolution') 2018-03-25 22:20:05 -07:00
Andy Miller
15e9cc5243 Merge branch 'develop' of github.com:getgrav/grav-plugin-admin into develop 2018-03-18 21:20:00 -06:00
Andy Miller
7d1313a60f optimization to stop admin from looking for pages in disabled plugins 2018-03-18 21:18:52 -06:00
Andy Miller
0930dabe1f Fix redirect bug when changing admin route to admin-* 2018-03-14 14:46:34 -06:00
Ryan Boog
b56ebbe028 Added unset functionality to pagemedia (dropzone) (#1366)
* Added unset functionality to pagemedia (dropzone). Unset removes the file from the page without deleting it from the system.

* Update unset.js for formatting

* Update unset.js. Removed console log and modified JSON parsing for native faster one.

* Updated unset.js. Fixed quote style

* Fixed couple issues with the unset of images

* Merged with latest Admin
2018-03-09 20:06:00 -07:00
Andy Miller
a565993141 Automatically redirect to new admin_route after changing it #1371 2018-03-09 17:31:11 -07:00
Andy Miller
1b97769ea5 Logout is one step now 2017-12-01 16:08:52 -07:00
Andy Miller
96469b673e Remove admin pro dependency 2017-09-25 17:10:54 -06:00
Andy Miller
fb24c95952 Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop 2017-08-31 12:46:56 -06:00
Andy Miller
4311b80eec minor improvements 2017-08-31 12:46:51 -06:00
Matias Griese
49a93e9897 Fixed administration being broken in multi-site environments with plugin overrides 2017-08-30 19:09:06 +03:00
Andy Miller
2f94c936ad Merge branch 'feature/simple-icon-picker' into develop
# Conflicts:
#	themes/grav/js/admin.min.js
#	themes/grav/js/vendor.min.js
2017-08-15 16:00:25 -06:00
Flavio Copes
05a6abd794 If a form is already defined, do not override it (#1132)
Preserves form validation re
https://github.com/getgrav/grav-plugin-admin/issues/1129
2017-07-25 18:54:58 -06:00
Flavio Copes
c227963540 Pick FA icons from yaml file
To update icons: dump the content of
https://rawgit.com/FortAwesome/Font-Awesome/master/src/icons.yml in
`themes/grav/templates/forms/fields/iconpicker/icons.yaml`
2017-07-14 17:42:20 +02:00
Dávid Szabó
ee2051eba6 Feature/page types events (#1105)
* Add function which replaces types and modularTypes

* Replace Pages statics with AdminPlugin statics

* Use Event's built-in items rather than data member

* Add configration for hiding page types
2017-06-27 12:43:12 -06:00
Andy Miller
fe6ecf4805 Fix for bad referenced to shouldLoadAdditionalFilesInBackground() #1145 2017-06-23 10:32:00 -06:00
Djamil Legato
dbdd6e2a45 Added info metadata button for preview images. Fixed preview of images 2017-06-21 17:55:33 -07:00
Flavio Copes
09f4d2b791 Fix #1141 referencing DI element when not initialized 2017-06-21 15:50:31 +02:00
Flavio Copes
f700837e92 Introduce the mediapicker field (#1125)
Added a new `mediapicker` form field which allows to select a media from any page
+ 
Provided an option to control how parent select field displays
2017-06-02 16:28:52 +02:00
Andy Miller
98897ad766 Revert "Bugfix: Save in wrong lang when multiple tabs open (#1101)"
This reverts commit 424e8400f9.
2017-05-10 15:20:47 -06:00
David Côté-Tremblay
424e8400f9 Bugfix: Save in wrong lang when multiple tabs open (#1101)
* Bugfix: Save in wrong lang when multiple tabs open

English and french in this PR are used only for example purposes.

When you have multiple tabs opened in different languages, it often cause to ovewrite the french contents with the english contents (or vice-versa, or according to your specific language configuration).

How to reproduce the bug :

1. Open a tab and edit a page in french
2. In another tab, open the same page in english then save
3. Return to the french tab and save
4. **The english contents got overwrited by the french contents**

This patch makes the use of the language code in URL instead of the session when editing a page, preventing to overwrite the contents of another page while power-editing with many tabs in different languages.

* Remove unused scopes about the session language
2017-05-06 11:01:31 -06:00
Andy Miller
46afadf5d4 Use new password and username regex from grav system config
# Conflicts:
#	CHANGELOG.md
2017-04-14 11:31:19 -06:00
Andy Miller
1bb1f378ed Initialize dynamic page forms properly 2017-04-14 11:27:44 -06:00
Flavio Copes
a1f5970a9c Fix misleading comment #1058 2017-04-11 09:47:12 +02:00
Djamil Legato
dfeb7c5c4a Initial impelementation of "View" item for pagemedia cards (#1010) 2017-03-08 17:05:08 -08:00
Andy Miller
8a84626935 Fixed issue with admin page using default expires, now forces 0 #1009 2017-03-08 15:36:28 -07:00
Flavio Copes
c7256134ba [WORK IN PROGRESS] First draft of a Tools menu with direct install (#990)
* First draft of a Tools menu with direct install

* Basic styling

* Translate GPM messages

* Basic frontend validation

* Fix form action path

* Added lang strings for offical_gpm_only toggle
2017-02-22 13:34:21 -07:00
Andy Miller
810a263544 Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop 2017-02-16 15:03:36 -07:00
Andy Miller
b849f040f1 Moved GPM get updates to standard method 2017-02-16 15:03:30 -07:00
Flavio Copes
799f13bdfb Fix #965 issue with quotes in Admin strings used in JS 2017-02-13 18:55:01 +01:00
Flavio Copes
508887e3e2 Remove cli-server exception since we now have compatibility with a custom router https://github.com/getgrav/grav/pull/1219 2016-12-17 15:11:12 +01:00
Flavio Copes
5966ed99e5 Add permissions field (don't merge yet) (#850)
* Add permissions field

* Add new PERMISSIONS string, compile SCSS
2016-11-28 19:01:01 +01:00
Andy Miller
f361addd60 Feature/admin fragmentation (#856)
* Separated Admin Controller into a generic and extendable Base controller. Added Autoload for properly loading classes

* Implemented custom class loader to force lowercase

* Removed composer autoloader for classes

* Updates

* Ability to pass custom upload URL for files

* Added new onAdminCanSave event for 3rd party plugins

* Moved files upload GC in onOutputGenerated event

* Cleanup

* Moved autoloader so it is always registering

* Fixed onOutputGenerated event location

* Moved `taskRemoveFileFromBlueprint`,  `taskRemoveMedia `, `canEditMedia` methods to admin base controller

* Allow to globally define `blueprint_type` and `file_url_remove` for the file field

* Moved `isMultilang()` into base controller

* Properly generate thumbnails in proportions for file fields

* Simplified execute restrictions with blacklist
2016-11-07 09:54:10 -07:00
Andy Miller
f13bd7983d Added new Admin cache_enabled option independent of main site. 2016-09-29 18:14:08 -06:00
Matias Griese
8e5720f7b9 Improve multi-site support 2016-09-27 18:21:11 +03:00