1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 12:25:22 +02:00

feat(global): introduce user teams and new UAC system (#868)

This commit is contained in:
Anthony Lapenna 2017-05-23 20:56:10 +02:00 committed by GitHub
parent a380fd9adc
commit 5523fc9023
160 changed files with 7112 additions and 3166 deletions

View file

@ -11,8 +11,8 @@ angular.module('portainer.services')
return Endpoints.query({}).$promise;
};
service.updateAuthorizedUsers = function(id, authorizedUserIDs) {
return Endpoints.updateAccess({id: id}, {authorizedUsers: authorizedUserIDs}).$promise;
service.updateAccess = function(id, authorizedUserIDs, authorizedTeamIDs) {
return Endpoints.updateAccess({id: id}, {authorizedUsers: authorizedUserIDs, authorizedTeams: authorizedTeamIDs}).$promise;
};
service.updateEndpoint = function(id, endpointParams) {
@ -23,7 +23,7 @@ angular.module('portainer.services')
authorizedUsers: endpointParams.authorizedUsers
};
if (endpointParams.type && endpointParams.URL) {
query.URL = endpointParams.type === 'local' ? ("unix://" + endpointParams.URL) : ("tcp://" + endpointParams.URL);
query.URL = endpointParams.type === 'local' ? ('unix://' + endpointParams.URL) : ('tcp://' + endpointParams.URL);
}
var deferred = $q.defer();
@ -48,8 +48,8 @@ angular.module('portainer.services')
service.createLocalEndpoint = function(name, URL, TLS, active) {
var endpoint = {
Name: "local",
URL: "unix:///var/run/docker.sock",
Name: 'local',
URL: 'unix:///var/run/docker.sock',
TLS: false
};
return Endpoints.create({}, endpoint).$promise;