Skip to content

Commit

Permalink
Merge pull request #7 from ChristianSYB/master
Browse files Browse the repository at this point in the history
Update permission check to support new version of Kirby
  • Loading branch information
mogelbrod authored Sep 7, 2017
2 parents 9dedf6d + 0c2d4dc commit 3756f80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently only auto-suggests existing pages, not files (but supports file copyin
### Requirements

- PHP 5.4.0+
- Kirby 2.3.0+
- Kirby 2.4.0+

### Kirby CLI (untested)

Expand Down
2 changes: 1 addition & 1 deletion copy-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function stripDotSegments($path) {
'method' => 'POST',
'action' => function() {
$user = site()->user()->current();
if (!$user || (!$user->hasPermission('panel.page.create') && !$user->isAdmin())) {
if (!$user || (!$user->permission('panel.page.create') && !$user->isAdmin())) {
return Response::error("Must be authenticated as user with page creation permissions");
}

Expand Down

0 comments on commit 3756f80

Please sign in to comment.