Download the PHP package misaf/vendra-permission without Composer

On this page you can find all versions of the php package misaf/vendra-permission. 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 vendra-permission

Vendra Permission

Role and permission management for Vendra applications.

Features

Requirements

Installation

Publish Spatie Permission's configuration if it is not already present, then publish Vendra's tenant-aware permission migration:

Optional: publish module translations:

Optional: publish module config:

If you use Pennant with the database driver, ensure Pennant storage is migrated in your application.

Configuration

If you want Spatie to use this module's models everywhere in your app, set config/permission.php:

The admin bypass role is configurable in config/vendra-permission.php:

The config key is admin_role (short and local to this file). The env var is VENDRA_PERMISSION_ADMIN_ROLE (prefixed to avoid global collisions). It defaults to RoleEnum::Admin — the top-level role granted to a tenant administrator; admins may create additional scoped roles themselves. This value is used for both the Gate::after() admin bypass and excluding that role from the roles table query.

Pennant feature behavior is configured in config/vendra-permission.php:

Filament

Resources are registered on the admin panel through PermissionPlugin:

Both resources live in the shared Customers cluster.

Changing a role's guard goes through ChangeRoleGuardAction: each attached permission is swapped for the permission of the same name under the new guard, and dropped when that guard has none. Permissions are shared between roles, so their own guard is never changed.

Access is feature-gated against the current scope returned by the shared TenantResolver:

Pennant Features

Feature resolution must be enabled. Tenant-aware applications reject non-tenant scopes; unresolved feature values use features.defaults.

Feature map:

Enum case Feature key Short key Effect
ModuleEnabled vendra-permission.module-enabled module-enabled Enables or hides both permission resources
RoleManagement vendra-permission.role-management role-management Enables or hides the roles resource
PermissionManagement vendra-permission.permission-management permission-management Enables or hides the permissions resource
BulkRoleAssignment vendra-permission.bulk-role-assignment bulk-role-assignment Enables or hides attach/detach role bulk actions

Artisan Commands

Toggle tenant features with:

feature accepts:

tenant accepts:

The command requires vendra-permission.features.enabled to be true.

Examples:

Seed permissions and demo data for a tenant with:

Usage

Use this package's tenant feature flags and console command to control access in each tenant:

Role/permission CRUD and assignment semantics follow Spatie Permission. See: https://spatie.be/docs/laravel-permission

Demo seeders use bundled JSON fixtures in production and when their declared factory classes are unavailable. Local monorepo development continues to use factories when they are autoloadable.

Testing

Run the package checks from the project root:

License

MIT. See LICENSE.


All versions of vendra-permission with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
awcodes/filament-badgeable-column Version ^4.0
laravel/pennant Version ^1.24
misaf/filament-jalali Version ^5.1.4
misaf/vendra-support Version self.version
spatie/laravel-package-tools Version ^1.93.1
spatie/laravel-permission Version ^8.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 misaf/vendra-permission contains the following files

Loading the files please wait ...