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) {
|
||||
RequiredActions.update({realm: realm.realm, alias: action.alias}, action, function() {
|
||||
Notifications.success("Auth requirement updated");
|
||||
setupForm();
|
||||
RequiredActions.update({id: realm.realm, alias: action.alias}, action, function() {
|
||||
Notifications.success("Required action updated");
|
||||
setupRequiredActionsForm();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -229,8 +229,10 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, UserFede
|
|||
$scope.userReqActionList = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
console.log("listed required action: " + data[i].name);
|
||||
item = data[i];
|
||||
$scope.userReqActionList.push(item);
|
||||
if (data[i].enabled) {
|
||||
var item = data[i];
|
||||
$scope.userReqActionList.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<tr data-ng-hide="requiredActions.length == 0">
|
||||
<th>Required Action</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>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="requiredAction in requiredActions" data-ng-show="requiredActions.length > 0">
|
||||
<td>{{requiredAction.name}}</td>
|
||||
<td>{{requiredAction.enabled}}</td>
|
||||
<td>{{requiredAction.defaultAction}}</td>
|
||||
<td><input type="checkbox" ng-model="requiredAction.enabled" ng-change="updateRequiredAction(requiredAction)"></td>
|
||||
<td><input type="checkbox" ng-model="requiredAction.defaultAction" ng-change="updateRequiredAction(requiredAction)"></td>
|
||||
</tr>
|
||||
<tr data-ng-show="requiredActions.length == 0">
|
||||
<td>No required actions configured</td>
|
||||
|
|
|
@ -276,7 +276,7 @@ public class AuthenticationManagementResource {
|
|||
throw new NotFoundException("Failed to find required action: " + alias);
|
||||
}
|
||||
RequiredActionProviderModel update = new RequiredActionProviderModel();
|
||||
update.setId(update.getId());
|
||||
update.setId(model.getId());
|
||||
update.setName(rep.getName());
|
||||
update.setAlias(rep.getAlias());
|
||||
update.setProviderId(model.getProviderId());
|
||||
|
|
Loading…
Reference in a new issue