Skip to content

Commit

Permalink
Update read me with current system changes
Browse files Browse the repository at this point in the history
  • Loading branch information
acoustep committed Aug 12, 2015
1 parent 5a8fd4a commit ffa3c9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

*This package is in very early development - breaking changes are imminent*

Entrust GUI is a Admin Interface for the Laravel Package Entrust.

Entrust GUI's goal is to make administration of users, roles and permissions easier for the [Entrust](https://github.com/Zizaco/entrust) package.
Entrust GUI is a Admin Interface that makes the administration of users, roles and permissions easier for the [Entrust](https://github.com/Zizaco/entrust) package.

This package is currently not for handling authentication, authorisation or registration of users.

Expand Down Expand Up @@ -47,7 +45,7 @@ php artisan migrate

Entrust GUI uses [dwight/validating](https://github.com/dwightwatson/validating) which means you can set your validation rules in your models.

Here are ```User```, ```Role``` and ```Permission``` models to get your started.
Here are ```User```, ```Role``` and ```Permission``` models to get you started.

### app/User.php

Expand Down Expand Up @@ -149,7 +147,7 @@ class Permission extends EntrustPermission
}
```

Add the Entrust GUI middleware to ```app\Http\Kernal.php```. This middleware will allow users with the ```admin``` role to access Entrust GUI and deny other users.
Add the Entrust GUI middleware to ```app\Http\Kernal.php```. This middleware will allow users with the role ```admin``` (case sensitive) to access Entrust GUI and deny other users.

```
protected $routeMiddleware = [
Expand Down Expand Up @@ -177,10 +175,12 @@ You can change this prefix by editing ```route-prefix``` in ```config/entrust-gu
'route-prefix' => 'admin'
```

Entrust GUI uses the ```auth``` middleware. Pointing your app to ```/entrust-gui/users``` will redirect you to ```/auth/login``` if you are not logged in and using the default ```auth``` middleware.
Entrust GUI uses the ```auth``` middleware. Pointing your app to ```/entrust-gui/users``` will redirect you to ```/auth/login``` if you are not logged in and using the default ```admin``` middleware.

If you have not set up Laravel authentication you will see a ```NotFoundHttpException``` exception. See the Laravel [Authentication](http://laravel.com/docs/5.1/authentication) documentation for setting up the Login system in Laravel 5.1.

If your account does not have the role ```admin``` you will see an unauthorized request page. You can set this in the database or temporarily switch the middleware to ```null``` or ```auth``` to give yourself access to Entrust GUI and configure your roles from within the GUI.

### Middleware

By default Entrust GUI uses ```entrust-gui.admin``` for middleware. This allows logged in users with the ```admin``` role to access it.
Expand All @@ -193,15 +193,15 @@ If you wish to test out the system without middleware then go to ```config/entru
'middleware' => null,
```

If you want to change the name of the role that has access to Entrust GUI, update ```middleware-role``` in the configuration file.
If you want to change the name of the role that has access to the ```admin``` middleware, update ```middleware-role``` in the configuration file.

```
"middleware-role" => 'sudo-admin',
```

### Layout

If you wish to use your own layout then override the ```layout``` key in ```config/entrust-gui.php``` with the template you wish to use.
To use your own layout override the ```layout``` key in ```config/entrust-gui.php``` with the template you wish to use.

```
"layout" => "app", // located in views/app.blade.php
Expand Down Expand Up @@ -315,9 +315,6 @@ protected $listen = [
## To do

* Testing
* Configuration
* Advanced middleware configuration
* Translations
* Validation
* Events
* Permissions GUI
* Document code
2 changes: 1 addition & 1 deletion views/permissions/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@section('heading', 'Permissions')

@section('content')
<a class="btn btn-labeled btn-primary" href="{{ route('entrust-gui::permissions.create') }}"><span class="btn-label"><i class="fa fa-plus"></i></span>Create Permission</a>
<a class="btn btn-labeled btn-primary" href="{{ route('entrust-gui::permissions.create') }}"><span class="btn-label"><i class="fa fa-plus"></i></span>Create Permission</a>
<table class="table table-striped">
<tr>
<th>Name</th>
Expand Down

0 comments on commit ffa3c9a

Please sign in to comment.