mirror of
https://github.com/portainer/portainer.git
synced 2025-07-31 03:09:44 +02:00
feat(extensions): remove rbac extension (#4157)
* feat(extensions): remove rbac extension client code * feat(extensions): remove server rbac code * remove extensions code * fix(notifications): remove error * feat(extensions): remove authorizations service * feat(rbac): deprecate fields * fix(portainer): revert change * fix(bouncer): remove rbac authorization check * feat(sidebar): remove roles link * fix(portainer): remove portainer module
This commit is contained in:
parent
8629738e34
commit
9d18d47194
117 changed files with 98 additions and 3487 deletions
|
@ -12,7 +12,6 @@ angular.module('portainer.docker').controller('DashboardController', [
|
|||
'EndpointService',
|
||||
'Notifications',
|
||||
'EndpointProvider',
|
||||
'ExtensionService',
|
||||
'StateManager',
|
||||
function (
|
||||
$scope,
|
||||
|
@ -28,7 +27,6 @@ angular.module('portainer.docker').controller('DashboardController', [
|
|||
EndpointService,
|
||||
Notifications,
|
||||
EndpointProvider,
|
||||
ExtensionService,
|
||||
StateManager
|
||||
) {
|
||||
$scope.dismissInformationPanel = function (id) {
|
||||
|
@ -75,13 +73,7 @@ angular.module('portainer.docker').controller('DashboardController', [
|
|||
const isAdmin = Authentication.isAdmin();
|
||||
const { allowStackManagementForRegularUsers } = $scope.applicationState.application;
|
||||
|
||||
if (isAdmin || allowStackManagementForRegularUsers) {
|
||||
return true;
|
||||
}
|
||||
const rbacEnabled = await ExtensionService.extensionEnabled(ExtensionService.EXTENSIONS.RBAC);
|
||||
if (rbacEnabled) {
|
||||
return Authentication.hasAuthorizations(['EndpointResourcesAccess']);
|
||||
}
|
||||
return isAdmin || allowStackManagementForRegularUsers;
|
||||
}
|
||||
|
||||
initView();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue