required actions edit
This commit is contained in:
parent
dddc5181e7
commit
5615d8d870
4 changed files with 10 additions and 9 deletions
|
@ -1625,9 +1625,8 @@ module.controller('RequiredActionsCtrl', function($scope, realm, RequiredActions
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.updateRequiredAction = function(action) {
|
$scope.updateRequiredAction = function(action) {
|
||||||
RequiredActions.update({realm: realm.realm, alias: action.alias}, action, function() {
|
RequiredActions.update({id: realm.realm, alias: action.alias}, action, function() {
|
||||||
Notifications.success("Auth requirement updated");
|
Notifications.success("Required action updated");
|
||||||
setupForm();
|
|
||||||
setupRequiredActionsForm();
|
setupRequiredActionsForm();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,8 +229,10 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, UserFede
|
||||||
$scope.userReqActionList = [];
|
$scope.userReqActionList = [];
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
console.log("listed required action: " + data[i].name);
|
console.log("listed required action: " + data[i].name);
|
||||||
item = data[i];
|
if (data[i].enabled) {
|
||||||
$scope.userReqActionList.push(item);
|
var item = data[i];
|
||||||
|
$scope.userReqActionList.push(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
<tr data-ng-hide="requiredActions.length == 0">
|
<tr data-ng-hide="requiredActions.length == 0">
|
||||||
<th>Required Action</th>
|
<th>Required Action</th>
|
||||||
<th>Enabled</th>
|
<th>Enabled</th>
|
||||||
<th>Default Action</th>
|
<th>Default Action <i class="fa fa-question-circle text-muted" tooltip="If enabled, any new user will have this required action assigned to it."></i></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="requiredAction in requiredActions" data-ng-show="requiredActions.length > 0">
|
<tr ng-repeat="requiredAction in requiredActions" data-ng-show="requiredActions.length > 0">
|
||||||
<td>{{requiredAction.name}}</td>
|
<td>{{requiredAction.name}}</td>
|
||||||
<td>{{requiredAction.enabled}}</td>
|
<td><input type="checkbox" ng-model="requiredAction.enabled" ng-change="updateRequiredAction(requiredAction)"></td>
|
||||||
<td>{{requiredAction.defaultAction}}</td>
|
<td><input type="checkbox" ng-model="requiredAction.defaultAction" ng-change="updateRequiredAction(requiredAction)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-ng-show="requiredActions.length == 0">
|
<tr data-ng-show="requiredActions.length == 0">
|
||||||
<td>No required actions configured</td>
|
<td>No required actions configured</td>
|
||||||
|
|
|
@ -276,7 +276,7 @@ public class AuthenticationManagementResource {
|
||||||
throw new NotFoundException("Failed to find required action: " + alias);
|
throw new NotFoundException("Failed to find required action: " + alias);
|
||||||
}
|
}
|
||||||
RequiredActionProviderModel update = new RequiredActionProviderModel();
|
RequiredActionProviderModel update = new RequiredActionProviderModel();
|
||||||
update.setId(update.getId());
|
update.setId(model.getId());
|
||||||
update.setName(rep.getName());
|
update.setName(rep.getName());
|
||||||
update.setAlias(rep.getAlias());
|
update.setAlias(rep.getAlias());
|
||||||
update.setProviderId(model.getProviderId());
|
update.setProviderId(model.getProviderId());
|
||||||
|
|
Loading…
Reference in a new issue