Comments (10)
It's fixed. Thank you.
Can you please update latest version and let me know if it's work for you?
from ntrust.
You can use like below role with or condition.
@ability('admin,owner,moderator', '')
This user has at least one role from admin, editor or moderator.
@endrole
from ntrust.
You can use like below.
@role(['superadmin', 'user'])
This should have role 'superadmin' or 'user'.
@endrole
@role(['superadmin', 'user'], true)
This should have both role 'superadmin' and 'user'.
@endrole
from ntrust.
To do this we have to use @role(('admin'))
from ntrust.
But this construction does not work @ROLE(('moderator|admin'))
from ntrust.
sure
from ntrust.
@ROLE('admin') Now it works.
Only one part can be used in Blade directive?
from ntrust.
There are total three blade directives.
Are you asking about that or something else?
@role('admin')
<p>This is visible to users with the admin role. Gets translated to
\Ntrust::role('admin')</p>
@endrole
@permission('manage-admins')
<p>This is visible to users with the given permissions. Gets translated to
\Ntrust::can('manage-admins'). The @can directive is already taken by core
laravel authorization package, hence the @permission directive instead.</p>
@endpermission
@ability('admin,owner', 'create-post,edit-user')
<p>This is visible to users with the given abilities. Gets translated to
\Ntrust::ability('admin,owner', 'create-post,edit-user')</p>
@endability
Also let me know if you think any feature missing.
from ntrust.
I mean, available use of multiple roles for the @ROLE directive in Blade (explode() function)
For example @role('admin|owner|moderator')
from ntrust.
Thanks, sorry for my carelessness.
from ntrust.
Related Issues (20)
- Trait method collision with SoftDeletes HOT 20
- Admin.php HOT 11
- BadMethodCallException with message 'Call to undefined method Illuminate\Database\Query\Builder::attachRole() HOT 2
- Call to undefined method Illuminate\Database\Query\Builder::restored() HOT 3
- Class name must be a valid object or a string HOT 4
- Class name must be a valid object or a string HOT 5
- Multi Auth migration create HOT 1
- Access to undeclared static property User::$staticRoleProfile HOT 6
- Migration to klaravel/ntrust from Zizaco/entrust HOT 1
- attachRole does not working HOT 6
- error in ntrust:migration
- $roleProfile variable is not present in user object HOT 1
- Access to undeclared static property: $staticRoleProfile HOT 1
- all with the admin role HOT 1
- [BadMethodCallException] Call to undefined method Illuminate\Database\Query\Builder::attachPermissio ns() HOT 1
- ntrust vs laravel built-in authorization HOT 2
- Edit role permissions issue HOT 3
- Route level if condition else redirects to dashboad. HOT 2
- No admin table ? HOT 2
- any plan to support the latest version of Laravel?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntrust.