Download the PHP package takepart-media/statamic-sop without Composer

On this page you can find all versions of the php package takepart-media/statamic-sop. 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 statamic-sop

Statamic SOP

A global SOP (Standard Operating Procedure) consent gate for the Statamic control panel: users must read and confirm every active SOP before they can work in the CP — with immutable versioning, forced re-consent on changes, and a revision-safe audit trail.

Latest Version Total Downloads

Features

Requirements

Installation

Then either run the install command, which creates the SOP database, runs the addon's migrations, and publishes config/sop.php:

or do the same steps by hand:

SOPs and consents live in their own SQLite database at storage/app/sop/sop.sqlite by default (see Configuration below) — a dedicated connection called sop, separate from the project's primary database.

Configuration

config/sop.php (published via the command above, or the tag sop-config):

Bypass handles are role/group handles, matching whatever is defined in resources/users/roles.yaml / resources/users/groups.yaml, for example:

A user in a bypassed group inherits the bypass through that group's roles as well — $user->isInGroup() and $user->hasRole() (via group membership) are both checked.

How versioning and re-consent work

Every time an SOP is saved, its title and content are hashed together (sha256(title . "\0" . content)). If the hash differs from the current version's hash, a new, immutable sop_versions row is written and the SOP is repointed at it — the old version is never edited or deleted. Consents reference a specific sop_version_id, not the SOP itself, so:

Gate behavior

The gate is prepended to Statamic's statamic.cp.authenticated middleware group, so it runs before Statamic's own authorization and before anything other addons add — a user who isn't allowed into the CP at all still gets Statamic's own 403, not the SOP screen. For an authenticated, access cp user with pending SOPs:

If the SOP database itself can't be reached, the middleware fails safe: bypassed users (super admins, configured roles/groups) are checked before the database is ever touched, so a broken database can never lock them out. Everyone else gets a standalone 503 page — with no dependency on the SOP database, and a logout link — instead of a stack trace.

Permissions

The addon registers one permission, manage sops, under the "SOPs" group in the Roles UI. It gates the SOP management screens (sop, sop/create, sop/{sop}, edit, update, delete) via can:manage sops on the routes. Super admins have it automatically. Note that having manage sops does not exempt a user from the consent gate itself — a manager with their own pending SOPs is still redirected to the consent screen first; use the bypass config for that instead.

Middleware ordering caveat

The gate uses Router::prependMiddlewareToGroup() from bootAddon(), which runs after every provider has booted — this reliably puts it ahead of Statamic's own Authorize middleware and ahead of whatever other addons append during their own boot. If another addon also prepends a gating middleware to the same group, the two prepends race based on provider boot order, which Statamic does not guarantee across addons. There is no in-process way to resolve that; if you run two prepending gate-style addons together, verify their effective order manually.

Uninstalling

Removing the package (composer remove takepart-media/statamic-sop) is enough to disable the gate and remove the CP screens. The SQLite database at storage/app/sop/sop.sqlite (or wherever SOP_DATABASE points) is not deleted automatically — it holds the full consent audit trail. Delete that file by hand once you no longer need the history, or keep it for records.

Support

Found a bug or have a feature request? Please open an issue on GitHub. See CHANGELOG.md for release notes.

License

Open source under the MIT license.


All versions of statamic-sop with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
statamic/cms Version ^6.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 takepart-media/statamic-sop contains the following files

Loading the files please wait ...