mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 13:25:26 +02:00
feat(global): introduce user teams and new UAC system (#868)
This commit is contained in:
parent
a380fd9adc
commit
5523fc9023
160 changed files with 7112 additions and 3166 deletions
36
app/services/controllerDataPipeline.js
Normal file
36
app/services/controllerDataPipeline.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
// ControllerDataPipeline is used to transfer data between multiple controllers.
|
||||
angular.module('portainer.services')
|
||||
.factory('ControllerDataPipeline', [function ControllerDataPipelineFactory() {
|
||||
'use strict';
|
||||
|
||||
var pipeline = {};
|
||||
|
||||
// accessControlData is used to manage the data required by the accessControlPanelController.
|
||||
var accessControlData = {};
|
||||
|
||||
pipeline.setAccessControlData = function (type, resourceId, resourceControl) {
|
||||
accessControlData.resourceType = type;
|
||||
accessControlData.resourceId = resourceId;
|
||||
accessControlData.resourceControl = resourceControl;
|
||||
};
|
||||
|
||||
pipeline.getAccessControlData = function() {
|
||||
return accessControlData;
|
||||
};
|
||||
|
||||
// accessControlFormData is used to manage the data available in the scope of the accessControlFormController.
|
||||
var accessControlFormData = {};
|
||||
|
||||
pipeline.setAccessControlFormData = function(accessControlEnabled, ownership, authorizedUsers, authorizedTeams) {
|
||||
accessControlFormData.accessControlEnabled = accessControlEnabled;
|
||||
accessControlFormData.ownership = ownership;
|
||||
accessControlFormData.authorizedUsers = authorizedUsers;
|
||||
accessControlFormData.authorizedTeams = authorizedTeams;
|
||||
};
|
||||
|
||||
pipeline.getAccessControlFormData = function() {
|
||||
return accessControlFormData;
|
||||
};
|
||||
|
||||
return pipeline;
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue