mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
feat(uac): add multi user management and UAC (#647)
This commit is contained in:
parent
f28f223624
commit
80d50378c5
91 changed files with 3973 additions and 866 deletions
23
app/services/endpointProvider.js
Normal file
23
app/services/endpointProvider.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
angular.module('portainer.services')
|
||||
.factory('EndpointProvider', ['LocalStorage', function EndpointProviderFactory(LocalStorage) {
|
||||
'use strict';
|
||||
var endpoint = {};
|
||||
var service = {};
|
||||
service.initialize = function() {
|
||||
var endpointID = LocalStorage.getEndpointID();
|
||||
if (endpointID) {
|
||||
endpoint.ID = endpointID;
|
||||
}
|
||||
};
|
||||
service.clean = function() {
|
||||
endpoint = {};
|
||||
};
|
||||
service.endpointID = function() {
|
||||
return endpoint.ID;
|
||||
};
|
||||
service.setEndpointID = function(id) {
|
||||
endpoint.ID = id;
|
||||
LocalStorage.storeEndpointID(id);
|
||||
};
|
||||
return service;
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue