You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/04/10 11:37:42 UTC

[GitHub] [cloudstack-primate] shwstppr opened a new pull request #291: view: offerings sub-section display

shwstppr opened a new pull request #291: view: offerings sub-section display
URL: https://github.com/apache/cloudstack-primate/pull/291
 
 
   Changes permission checking behaviour.
   Multiple APIs can be passed in section child's permission property as an array.
   First API will be used to compute the route for the child sub-section.
   Remaining APIs will only be used to verify permissions. If any of the passed API is not found in the allowed APIs for logged-in user's role section/sub-section won't be displayed.
   
   Fixes #241 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack-primate] rhtyd commented on a change in pull request #291: view: permission check, section display

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #291: view: permission check, section display
URL: https://github.com/apache/cloudstack-primate/pull/291#discussion_r408301422
 
 

 ##########
 File path: src/store/modules/permission.js
 ##########
 @@ -20,11 +20,12 @@ 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 true
+      console.log(route.meta.name, permission)
 
 Review comment:
   @shwstppr could this make permissions too strict; we've use this to show views when we want any of the APIs allowed in the list. Let's discuss tomorrow.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack-primate] shwstppr commented on issue #291: view: offerings sub-section display

Posted by GitBox <gi...@apache.org>.
shwstppr commented on issue #291: view: offerings sub-section display
URL: https://github.com/apache/cloudstack-primate/pull/291#issuecomment-611996839
 
 
   @rhtyd please review. Do you think to check multiple APIs for permission a better option for checking permission and visibility for sections when the primary API doesn't have allowed roles defined

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack-primate] shwstppr edited a comment on issue #291: view: offerings sub-section display

Posted by GitBox <gi...@apache.org>.
shwstppr edited a comment on issue #291: view: offerings sub-section display
URL: https://github.com/apache/cloudstack-primate/pull/291#issuecomment-611996839
 
 
   @rhtyd please review. Do you think to check multiple APIs for permission a better option for checking permission and visibility for sections when the primary API doesn't have allowed roles defined?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services