Download the PHP package sylvainjule/bouncer without Composer

On this page you can find all versions of the php package sylvainjule/bouncer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bouncer

Kirby – Bouncer

Restrict access of a user role to a specific page (and its children) in the panel.

bouncer-screenshot


Overview

This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, you can consider making a donation of your choice.


1. Installation

Download and copy this repository to

Alternatively, you can install it with composer:


2. Setup

The intent of this plugin is to limit a user's ability to edit only their Account page + pages (and their children) selected in a Pages field.

2.1 Allow additionnal paths

In your site/config/config.php, you can configure for each role some extra paths the user will be able to visit. It can be useful if you have custom panel areas, for example.

2.2 Optional page switcher

(beta)

Since 1.0.1 a given user can access different pages. You can remove the multiple: false option from the blueprint:

Add a bouncernav section in every page you'd like to display the page switcher on:

Then state in your config.php that you want to display the page switcher for a given user role:

2.3 Fallback path

In your site/config/config.php, you can configure for each role which path to fallback to when the user tries to access a forbidden page. It is optional: if left empty, the first accessible page from the Pages field associated to the user's role (canaccess, in our example) will be used.

2.4 Movable pages

By default, a restricted user will be able to move pages even to pages it cannot access. Kirby calls a isMovableTo method to check which pages to disable / enable in the Move page dialog, which is declared in the Page class and cannot be overwritten globally from the plugin. However if you want to apply the bouncer's restrictions to this page tree and disable restricted pages, the plugin provides a replacement method.

You have to declare a custom Page model for each page in order to apply it:


3. Disclaimer

I needed this functionnality for a website and turned it into a plugin. I hope it can prove helpful, but do not intend to extend it or support more refined restriction scenarios with this plugin.


4. License

MIT


All versions of bouncer with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sylvainjule/bouncer contains the following files

Loading the files please wait ....