@websanova/vue-auth
Advanced tools
Comparing version 2.21.4-beta to 2.21.5-beta
@@ -22,2 +22,3 @@ # Privileges | ||
* Must be an array of strings. For this to work both the checks need to be this way. | ||
* The user must be logged in. Additionally the string or array will be checked against the users roles. | ||
@@ -81,2 +82,18 @@ * Note that the users `roles` variable can be set in the options. | ||
## Comparing Roles | ||
The following user `role` to `$auth.check` or `meta.auth` combinations should work. | ||
Note: An `Array` of `String` can be compared with a `String` and an `Object` with an `Object`. But not an `Array` of `Object`. | ||
``` | ||
'user' => 'user' | ||
'user' => ['user'] | ||
['user'] => 'user' | ||
{role: 'user'} => {role: 'user'} | ||
{role: 'user'} => {role: ['user']} | ||
{role: ['user']} => {role: 'user'} | ||
``` | ||
## Examples | ||
@@ -105,3 +122,3 @@ | ||
'/private': { | ||
auth: [{"people": "administrator", "people": "superadmin"}], | ||
auth: {"people": "administrator", "products": "superadmin"}, | ||
component: require('./Account') | ||
@@ -143,3 +160,3 @@ }, | ||
path: '/private', | ||
meta: {auth: [{"people": "administrator", "people": "superadmin"}]}, | ||
meta: {auth: {"people": "administrator", "products": "superadmin"}}, | ||
component: require('./Account') | ||
@@ -146,0 +163,0 @@ }, { |
@@ -17,3 +17,3 @@ { | ||
"version": "2.21.4-beta", | ||
"version": "2.21.5-beta", | ||
@@ -20,0 +20,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
767568