You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2019/03/29 13:51:47 UTC

[GitHub] [brooklyn-ui] jcabrerizo commented on a change in pull request #130: Fix entitlement messages

jcabrerizo commented on a change in pull request #130: Fix entitlement messages
URL: https://github.com/apache/brooklyn-ui/pull/130#discussion_r270416036
 
 

 ##########
 File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
 ##########
 @@ -188,7 +188,11 @@ export function summaryController($scope, $state, $stateParams, $q, $http, brSna
             entityApi.updateEntityName(applicationId, entityId, this.name).then((response)=> {
                 vm.entity.name = vm.name;
             }).catch((error)=> {
-                brSnackbar.create('Cannot update entity name: the entity [' + entityId + '] is undefined');
+                if(error.data && error.data.error === 403){
 
 Review comment:
   The security provider manages the authentication, but an authenticated user can try execute actions that need an entitlement that s/he hasn't. In this case, the exception thrown send an 403 as status. I tried to left the previous behavior and also manage the unauthorized action. If it doesn't make sense for you @tbouron i can change it.

----------------------------------------------------------------
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