Skip to content

Commit

Permalink
upcoming: [DI-21118] - Monitor scope as part of PAT token (#11318)
Browse files Browse the repository at this point in the history
* upcoming: [DI-21118] - ACLP scope as part of PAT token

* upcoming: [DI-21118] - Monitor scope as part of PAT token

* upcoming: [DI-21118] - PR comment

* upcoming: [DI-21118] - Added changeset
  • Loading branch information
ankita-akamai authored Nov 26, 2024
1 parent cf84d85 commit 8a6d1ca
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

As part of creating the PAT token, Enabled a new scope - 'Monitor' within Cloud Manager UI ([#11318](https://github.com/linode/manager/pull/11318))
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('View API Token Drawer', () => {
{...props}
token={appTokenFactory.build({
scopes:
'databases:read_only domains:read_write child_account:read_write events:read_write firewall:read_write images:read_write ips:read_write linodes:read_only lke:read_only longview:read_write nodebalancers:read_write object_storage:read_only stackscripts:read_write volumes:read_only vpc:read_write',
'databases:read_only domains:read_write child_account:read_write events:read_write firewall:read_write images:read_write ips:read_write linodes:read_only lke:read_only longview:read_write monitor:read_only nodebalancers:read_write object_storage:read_only stackscripts:read_write volumes:read_only vpc:read_write',
})}
/>
);
Expand All @@ -128,6 +128,7 @@ describe('View API Token Drawer', () => {
linodes: 1,
lke: 1,
longview: 2,
monitor: 1,
nodebalancers: 2,
object_storage: 1,
stackscripts: 2,
Expand Down
16 changes: 16 additions & 0 deletions packages/manager/src/features/Profile/APITokens/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('APIToken utils', () => {
['linodes', 2],
['lke', 2],
['longview', 2],
['monitor', 2],
['nodebalancers', 2],
['object_storage', 2],
['stackscripts', 2],
Expand All @@ -63,6 +64,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand All @@ -89,6 +91,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand All @@ -115,6 +118,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand All @@ -141,6 +145,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand Down Expand Up @@ -169,6 +174,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 2],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand Down Expand Up @@ -199,6 +205,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand Down Expand Up @@ -229,6 +236,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand All @@ -255,6 +263,7 @@ describe('APIToken utils', () => {
['linodes', 0],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand All @@ -276,6 +285,7 @@ describe('APIToken utils', () => {
['linodes', 1],
['lke', 1],
['longview', 1],
['monitor', 1],
['nodebalancers', 1],
['object_storage', 1],
['stackscripts', 1],
Expand All @@ -296,6 +306,7 @@ describe('APIToken utils', () => {
['linodes', 2],
['lke', 2],
['longview', 2],
['monitor', 2],
['nodebalancers', 2],
['object_storage', 2],
['stackscripts', 2],
Expand All @@ -317,6 +328,7 @@ describe('APIToken utils', () => {
['linodes', 1],
['lke', 2],
['longview', 2],
['monitor', 2],
['nodebalancers', 0],
['object_storage', 2],
['stackscripts', 2],
Expand All @@ -339,6 +351,7 @@ describe('APIToken utils', () => {
['linodes', 1],
['lke', 1],
['longview', 2],
['monitor', 1],
['nodebalancers', 1],
['object_storage', 1],
['stackscripts', 1],
Expand Down Expand Up @@ -375,6 +388,7 @@ describe('hasAccessBeenSelectedForAllScopes', () => {
['linodes', -1],
['lke', -1],
['longview', -1],
['monitor', -1],
['nodebalancers', -1],
['object_storage', -1],
['stackscripts', -1],
Expand All @@ -394,6 +408,7 @@ describe('hasAccessBeenSelectedForAllScopes', () => {
['linodes', -1],
['lke', -1],
['longview', -1],
['monitor', -1],
['nodebalancers', -1],
['object_storage', -1],
['stackscripts', -1],
Expand All @@ -413,6 +428,7 @@ describe('hasAccessBeenSelectedForAllScopes', () => {
['linodes', 2],
['lke', 0],
['longview', 0],
['monitor', 0],
['nodebalancers', 0],
['object_storage', 0],
['stackscripts', 0],
Expand Down
2 changes: 2 additions & 0 deletions packages/manager/src/features/Profile/APITokens/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const basePerms = [
'linodes',
'lke',
'longview',
'monitor',
'nodebalancers',
'object_storage',
'stackscripts',
Expand All @@ -37,6 +38,7 @@ export const basePermNameMap = {
linodes: 'Linodes',
lke: 'Kubernetes',
longview: 'Longview',
monitor: 'Monitor',
nodebalancers: 'NodeBalancers',
object_storage: 'Object Storage',
stackscripts: 'StackScripts',
Expand Down

0 comments on commit 8a6d1ca

Please sign in to comment.