mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 23:05:26 +02:00
feat(oauth): default team for user on oauth settings
This commit is contained in:
parent
4d8133f696
commit
2755527d28
6 changed files with 37 additions and 7 deletions
|
@ -53,4 +53,5 @@ function OAuthSettingsViewModel(data) {
|
|||
this.UserIdentifier = data.UserIdentifier;
|
||||
this.Scopes = data.Scopes;
|
||||
this.OAuthAutoCreateUsers = data.OAuthAutoCreateUsers;
|
||||
this.DefaultTeamID = data.DefaultTeamID;
|
||||
}
|
|
@ -322,7 +322,7 @@
|
|||
<!-- !group-search-settings -->
|
||||
</div>
|
||||
|
||||
<oauth-settings ng-if="isOauthEnabled()" settings="OAuthSettings"></oauth-settings>
|
||||
<oauth-settings ng-if="isOauthEnabled()" settings="OAuthSettings" teams="teams"></oauth-settings>
|
||||
|
||||
<!-- actions -->
|
||||
<div class="form-group">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('portainer.app')
|
||||
.controller('SettingsAuthenticationController', ['$q', '$scope', 'Notifications', 'SettingsService', 'FileUploadService',
|
||||
function ($q, $scope, Notifications, SettingsService, FileUploadService) {
|
||||
.controller('SettingsAuthenticationController', ['$q', '$scope', 'Notifications', 'SettingsService', 'FileUploadService', 'TeamService',
|
||||
function ($q, $scope, Notifications, SettingsService, FileUploadService, TeamService) {
|
||||
|
||||
$scope.state = {
|
||||
successfulConnectivityCheck: false,
|
||||
|
@ -96,9 +96,12 @@ function ($q, $scope, Notifications, SettingsService, FileUploadService) {
|
|||
}
|
||||
|
||||
function initView() {
|
||||
SettingsService.settings()
|
||||
.then(function success(data) {
|
||||
var settings = data;
|
||||
$q.all({
|
||||
settings: SettingsService.settings(),
|
||||
teams: TeamService.teams()
|
||||
}).then(function success(data) {
|
||||
var settings = data.settings;
|
||||
$scope.teams = data.teams;
|
||||
$scope.settings = settings;
|
||||
$scope.LDAPSettings = settings.LDAPSettings;
|
||||
$scope.OAuthSettings = settings.OAuthSettings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue