mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Redirect to home when unauthorized user click 'credentials'
This commit is contained in:
parent
5896c12a0a
commit
1d291accdd
2 changed files with 14 additions and 4 deletions
|
|
@ -66,9 +66,9 @@ admin = *
|
|||
# anon means the access is anonymous.
|
||||
# authc means Form based Auth Security
|
||||
# To enfore security, comment the line below and uncomment the next one
|
||||
# /api/version = anon
|
||||
# /api/interpreter/** = authc, roles[admin]
|
||||
# /api/configurations/** = authc, roles[admin]
|
||||
# /api/credential/** = authc, roles[admin]
|
||||
/api/version = anon
|
||||
#/api/interpreter/** = authc, roles[admin]
|
||||
#/api/configurations/** = authc, roles[admin]
|
||||
#/api/credential/** = authc, roles[admin]
|
||||
/** = anon
|
||||
#/** = authc
|
||||
|
|
|
|||
|
|
@ -30,6 +30,16 @@ angular.module('zeppelinWebApp').controller('CredentialCtrl', function($scope, $
|
|||
console.log('Success %o %o', status, $scope.credentialInfo);
|
||||
}).
|
||||
error(function(data, status, headers, config) {
|
||||
if (status === 401) {
|
||||
ngToast.danger({
|
||||
content: 'You don\'t have permission on this page',
|
||||
verticalPosition: 'bottom',
|
||||
timeout: '3000'
|
||||
});
|
||||
setTimeout(function() {
|
||||
window.location.replace('/');
|
||||
}, 3000);
|
||||
}
|
||||
console.log('Error %o %o', status, data.message);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue