From 9d8681a21bd1761b4ed8685d8851e0304420f328 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 8 Aug 2017 16:52:42 -0700 Subject: [PATCH] joyent/node-triton#201 Assuming an RBAC role in triton CLI v5 throws error Reviewed by: Julien Gilli --- CHANGES.md | 4 ++++ lib/config.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index e495370..4d36359 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,9 +7,13 @@ Known issues: ## not yet released +- [joyent/node-triton#201] Fix `triton -r,--role ROLE ...` option for taking up + an RBAC role. This was introduced in v4.12.0 and was accidentally broken + in v5.0.0. - [joyent/node-triton#217] `triton volume ls -l` should output a `RESOURCE` column. + ## 5.3.0 - [joyent/node-triton#173], [joyent/node-triton#174] and diff --git a/lib/config.js b/lib/config.js index f1cae3f..fe2fda0 100644 --- a/lib/config.js +++ b/lib/config.js @@ -62,6 +62,7 @@ var PROFILE_FIELDS = { keyId: true, insecure: true, user: true, + roles: true, actAsAccount: true }; @@ -234,6 +235,7 @@ function validateProfile(profile, profilePath) { profile.name === 'env' ? 'TRITON_USER or SDC_USER' : 'profile.user'); assert.optionalString(profile.actAsAccount, 'profile.actAsAccount'); + assert.optionalArrayOfString(profile.roles, 'profile.roles'); } catch (err) { var msg = format('invalid %sprofile%s: %s', profile.name ? '"' + profile.name + '" ' : '',