security and ui updates
This commit is contained in:
		
							parent
							
								
									a4027bcad9
								
							
						
					
					
						commit
						3b5d7a49d4
					
				| @ -148,6 +148,17 @@ | |||||||
|         <div ng-if="vm.config"> |         <div ng-if="vm.config"> | ||||||
|           <div ng-init="siteconf = vm.config.global"> |           <div ng-init="siteconf = vm.config.global"> | ||||||
|             <div ng-if="'network' === vm.admin.page"> |             <div ng-if="'network' === vm.admin.page"> | ||||||
|  |               <h1>Server Name:</h1> | ||||||
|  |               <input | ||||||
|  |                 type="text" | ||||||
|  |                 ng-model="vm.admin.servername" | ||||||
|  |                 /> | ||||||
|  |               <button | ||||||
|  |                 type="button" | ||||||
|  |                 ng-click="vm.admin.setDeviceName(vm.admin.servername)" | ||||||
|  |                 ng-disabled="vm.config.device.hostname === vm.admin.servername" | ||||||
|  |                 >Save</button> | ||||||
|  | 
 | ||||||
|               <h1>Addresses:</h1> |               <h1>Addresses:</h1> | ||||||
|               <table class="table"> |               <table class="table"> | ||||||
|                 <tr> |                 <tr> | ||||||
| @ -160,8 +171,16 @@ | |||||||
|                   <td ng-bind="addr.iface"></td> |                   <td ng-bind="addr.iface"></td> | ||||||
|                   <td ng-bind="addr.address"></td> |                   <td ng-bind="addr.address"></td> | ||||||
|                   <td ng-bind="addr.family"></td> |                   <td ng-bind="addr.family"></td> | ||||||
|                   <td ng-if="'unicast' !== addr.range" ng-bind="addr.range"></td> |                   <td><span | ||||||
|                   <td ng-if="'unicast' === addr.range"><strong>Internet</strong></td> |                     ng-if="'unicast' !== addr.range" ng-bind="addr.range"></span | ||||||
|  |                     ><strong ng-if="'unicast' === addr.range">Internet</strong> | ||||||
|  |                     <button | ||||||
|  |                       ng-if="vm.admin.network.iface !== addr.iface" | ||||||
|  |                       class="btn btn-primary" | ||||||
|  |                       type="button" | ||||||
|  |                       ng-click="vm.admin.setInterface(addr)" | ||||||
|  |                       >Use <span ng-bind="addr.iface"></span></button></td> | ||||||
|  |                   </td> | ||||||
|                 </tr> |                 </tr> | ||||||
|                 <tr> |                 <tr> | ||||||
|                   <td>OAuth3 Tunnel</td> |                   <td>OAuth3 Tunnel</td> | ||||||
|  | |||||||
| @ -1,7 +1,18 @@ | |||||||
| angular.module('com.daplie.cloud', [ 'org.oauth3' ]) | angular.module('com.daplie.cloud', [ 'org.oauth3' ]) | ||||||
|   .service('oauth3', [ 'Oauth3', function (Oauth3) { |   .service('oauth3', [ 'Oauth3', function (Oauth3) { | ||||||
|  |     // for security this app should not store the refresh token
 | ||||||
|  |     // (the localhost.* domains should never store them)
 | ||||||
|  |     Oauth3.hooks.session._store = {}; | ||||||
|  |     Oauth3.hooks.session._get = function (providerUri) { | ||||||
|  |       return Oauth3.PromiseA.resolve(Oauth3.hooks.session._store[providerUri]); | ||||||
|  |     }; | ||||||
|  |     Oauth3.hooks.session._set = function (providerUri, session) { | ||||||
|  |       Oauth3.hooks.session._store[providerUri] = session; | ||||||
|  |       return Oauth3.PromiseA.resolve(session); | ||||||
|  |     }; | ||||||
|     var auth = Oauth3.create(); |     var auth = Oauth3.create(); | ||||||
|     auth.setProvider('oauth3.org'); |     auth.setProvider('oauth3.org'); | ||||||
|  |     window.oauth3 = auth; // debug
 | ||||||
|     return auth; |     return auth; | ||||||
|   } ]) |   } ]) | ||||||
|   .controller('LoginController', [ '$scope', '$timeout', 'oauth3', function ($scope, $timeout, oauth3) { |   .controller('LoginController', [ '$scope', '$timeout', 'oauth3', function ($scope, $timeout, oauth3) { | ||||||
|  | |||||||
| @ -1 +1 @@ | |||||||
| Subproject commit 64393a540d7cc60821aa1c541ef71101be418008 | Subproject commit b2a992d2d5d7ebef7ea0123127a2395ab89e01a2 | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user