mostafamaklad / laravel-permission-mongodb

Associate users with roles and permissions using Laravel and MongoDB
https://maklad.dev
MIT License
112 stars 66 forks source link

check the db connection before registering the permissions #111

Closed MerQ-ai closed 4 years ago

MerQ-ai commented 4 years ago

Description

checking the database connection before the registering the permissions instead of Defer registering permissions on the Gate instance until it's resolved to grant the permissions before other authorization checks

Motivation and context

to be able to use @can directive properly

How has this been tested?

this is a refactor ( don't think any test needed )

Screenshots (if appropriate)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

MerQ-ai commented 4 years ago

fixed the issue , please check

mostafamaklad commented 4 years ago

Codacy Here is an overview of what got changed by this pull request:


Complexity increasing per file
==============================
- src/PermissionServiceProvider.php  1

See the complete overview on Codacy

mostafamaklad commented 4 years ago

Thanks for your contribution 👍