cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ro...@apache.org
Subject [cloudstack-primate] 03/03: permission: allow permissive routes
Date Sun, 24 Nov 2019 19:21:27 GMT
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git

commit 591737f4874d63789aa23d94f843707176c79146
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Mon Nov 25 00:49:13 2019 +0530

    permission: allow permissive routes
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 src/store/modules/permission.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index e273683..4ab5c61 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -20,10 +20,11 @@ import { asyncRouterMap, constantRouterMap } from '@/config/router'
 function hasApi (apis, route) {
   if (route.meta && route.meta.permission) {
     for (const permission of route.meta.permission) {
-      if (!apis.includes(permission)) {
-        return false
+      if (apis.includes(permission)) {
+        return true
       }
     }
+    return false
   }
   return true
 }


Mime
View raw message