diff --git a/tatudashboard/static/tatudashboard/resources/os-tatu-user/create.service.js b/tatudashboard/static/tatudashboard/resources/os-tatu-user/create.service.js index 20a0882..71e6901 100644 --- a/tatudashboard/static/tatudashboard/resources/os-tatu-user/create.service.js +++ b/tatudashboard/static/tatudashboard/resources/os-tatu-user/create.service.js @@ -119,14 +119,14 @@ "schema": { "type": "object", "properties": { - "'pub_key'": { + "pub_key": { "type": "string" } } }, "form": [ { - "key": "'pub_key'", + "key": "pub_key", "type": "textarea", "title": gettext("SSH Public Key"), "description": gettext("The user's SSH public key."), diff --git a/tatudashboard/static/tatudashboard/resources/os-tatu-user/revoke.service.js b/tatudashboard/static/tatudashboard/resources/os-tatu-user/revoke.service.js index 09380b6..0d88590 100644 --- a/tatudashboard/static/tatudashboard/resources/os-tatu-user/revoke.service.js +++ b/tatudashboard/static/tatudashboard/resources/os-tatu-user/revoke.service.js @@ -60,7 +60,7 @@ var notAllowedMessage = gettext("You are not allowed to revoke user certificates: %s"); var service = { - initScope: initScope, + initAction: initAction, allowed: allowed, perform: perform }; @@ -69,19 +69,19 @@ ////////////// - function initScope(newScope) { - scope = newScope; + function initAction() { context = { }; revokeUserPromise = policy.ifAllowed({rules: [['ssh', 'revoke_user_cert']]}); } - function perform(items) { - var certs = angular.isArray(items) ? items : [items]; - context.labels = labelize(certs.length); + function perform(items, thescope) { + scope = thescope + var users = angular.isArray(items) ? items : [items]; + context.labels = labelize(users.length); return $qExtensions.allSettled(users.map(checkPermission)).then(afterCheck); } - function allowed(user) { + function allowed(user, thescope) { // only row actions pass in user // otherwise, assume it is a batch action if (user) {