Pktharindu Nova Permissions Versions Save

Add Permissions based authorization for your Nova installation via User-based Roles and Permissions. Roles are defined in the database whereas Permissions are defined in the code base.

v2.1.5

3 years ago

Merged PR #23 from contributor @dmason30.

v2.1.4

3 years ago

v2.1.3

4 years ago

v2.1.2

4 years ago

Fixed #12

v2.1.1

4 years ago

made the group, display name, and description properties translatable.

v2.1.0

4 years ago

v2.0.1

4 years ago

Fixed the Role model which was replaced by AuthServiceProvider

v2.0.0

4 years ago

Database table names now can be configured using the config file.

// in config/nova-permissions.php

<?php

return [

    // ...

    /*
    |--------------------------------------------------------------------------
    | Database table names
    |--------------------------------------------------------------------------
    | When using the "HasRoles" trait from this package, we need to know which
    | table should be used to retrieve your roles. We have chosen a basic
    | default value but you may easily change it to any table you like.
    */

    'table_names' => [
        'roles' => 'roles',

        'role_permission' => 'role_permission',

        'role_user' => 'role_user',
    ],

    // ...
];

v1.2.0

4 years ago

v1.1.0

5 years ago

If you want to use your own role resource, you can define it when you register the tool:

// in app/Providers/NovaServiceProvider.php

// ...

use App\Nova\Role;

public function tools()
{
    return [
        // ...
        \Pktharindu\NovaPermissions\NovaPermissions::make()
            ->roleResource(Role::class),
    ];
}

Then extend the Pktharindu\NovaPermissions\Nova\Role in your role resource:

// in app/Nova/Role.php

use Pktharindu\NovaPermissions\Nova\Role as RoleResource;

class Role extends RoleResource
{
    // ...  
}