Download the PHP package perspeqtive/sulu-permission-aware-templates-bundle without Composer

On this page you can find all versions of the php package perspeqtive/sulu-permission-aware-templates-bundle. 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 sulu-permission-aware-templates-bundle

Sulu Permission Aware Templates Bundle

Latest Stable Version

This bundle adds permission-aware page templates to the Sulu admin.

It registers a security context for every available Sulu page template and uses these permissions to restrict the template dropdown and the page toolbar actions. This makes it possible to decide per role which templates can be selected, changed, saved, published, unpublished, or deleted.

✨ Features

📋 Requirements

⚙️ Installation

Install the bundle via composer:

Enable the bundle

If your application does not use Symfony Flex, register the bundle manually:

Add the bundle to package.json

In order to enable visibility- and disabled-checks for toolbar actions, you need to register the bundle in your package.json:

Import the bundle

Rebuild the admin JS

Clear the cache

Clear the cache after installing the bundle:

🔐 Permissions

After installation, Sulu contains a new Templates security section. Every page template is registered with its own security context:

The permission behavior is:

Permission Behavior
add The user may edit a content page that already uses the template, but cannot change the template.
write The user may select the template in the dropdown and may change an existing page to this template. The user may also save, publish and unpublish pages using this template.
delete The user may delete a content page that uses this template.

⚠️ Important: Users without the required template permission can still edit content pages they are allowed to access, but the template-related actions are restricted by the permissions above.

Internally the bundle maps these checks to Sulu's template security permissions:

Sulu permission Used for
add Template dropdown availability
edit Save, publish and unpublish toolbar actions
delete Delete toolbar action

⚠️ Important: After changing the permissions, you need to clear the browser cache (F5) for the changes to take effect.

🧩 Usage

No additional configuration is required. The bundle reads the available page templates from Sulu's page form metadata and registers matching security contexts automatically.

Assign the permissions in the Sulu role settings:

  1. Open the Sulu admin.
  2. Go to Settings > Roles.
  3. Select a role.
  4. Configure the permissions in Sulu > Templates.
  5. Save the role.

The page editor then applies the permissions automatically:

⚠️ Important: After changing the permissions, you need to clear the browser cache (F5) for the changes to take effect.

🤝 Contribution

Please feel free to fork and extend existing or add new features and send a pull request with your changes. To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.


All versions of sulu-permission-aware-templates-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
sulu/sulu Version ^3.0
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 perspeqtive/sulu-permission-aware-templates-bundle contains the following files

Loading the files please wait ...