Skip to content

Commit

Permalink
Merge pull request #10133 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.110.3 - staging → master
  • Loading branch information
jaalah-akamai authored Jan 31, 2024
2 parents a83de82 + 02eea2c commit 8bbaaad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
5 changes: 5 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [2024-01-31] - v1.110.3

### Fix:
- Enable `Can add VPCs to this account` for user permissions

## [2024-01-31] - v1.110.2

### Changed:
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "linode-manager",
"author": "Linode",
"description": "The Linode Manager website",
"version": "1.110.2",
"version": "1.110.3",
"private": true,
"type": "module",
"bugs": {
Expand Down
27 changes: 9 additions & 18 deletions packages/manager/src/features/Users/UserPermissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ interface State {
showTabs?: boolean;
tabs?: string[];
userType: null | string;
vpcEnabled: boolean;
}

type CombinedProps = Props &
Expand All @@ -98,12 +97,6 @@ class UserPermissions extends React.Component<CombinedProps, State> {
componentDidMount() {
this.getUserGrants();
this.getUserType();

if (this.props.flags.vpc) {
this.setState({ vpcEnabled: true });
this.entityPerms.push('vpc');
this.globalBooleanPerms.push('add_vpcs');
}
}

componentDidUpdate(prevProps: CombinedProps) {
Expand Down Expand Up @@ -174,6 +167,7 @@ class UserPermissions extends React.Component<CombinedProps, State> {
'domain',
'longview',
'database',
'vpc',
];

entitySetAllTo = (entity: GrantType, value: GrantLevel) => () => {
Expand Down Expand Up @@ -269,17 +263,18 @@ class UserPermissions extends React.Component<CombinedProps, State> {
};

globalBooleanPerms = [
'add_databases',
'add_domains',
'add_firewalls',
'add_images',
'add_linodes',
'add_nodebalancers',
'add_longview',
'longview_subscription',
'add_domains',
'add_nodebalancers',
'add_stackscripts',
'add_images',
'add_volumes',
'add_firewalls',
'add_databases',
'add_vpcs',
'cancel_account',
'longview_subscription',
];

globalPermOnChange = (perm: string) => (
Expand Down Expand Up @@ -484,15 +479,12 @@ class UserPermissions extends React.Component<CombinedProps, State> {
add_nodebalancers: 'Can add NodeBalancers to this account ($)',
add_stackscripts: 'Can create StackScripts under this account',
add_volumes: 'Can add Block Storage Volumes to this account ($)',
add_vpcs: 'Can add VPCs to this account',
cancel_account: 'Can cancel the entire account',
longview_subscription:
'Can modify this account\u{2019}s Longview subscription ($)',
};

if (this.state.vpcEnabled) {
permDescriptionMap['add_vpcs'] = 'Can add VPCs to this account';
}

if (this.state.userType === 'parent') {
permDescriptionMap['child_account_access'] =
'Enable child account access';
Expand Down Expand Up @@ -818,7 +810,6 @@ class UserPermissions extends React.Component<CombinedProps, State> {
loadingGrants: false,
setAllPerm: 'null',
userType: null,
vpcEnabled: false,
};
}

Expand Down

0 comments on commit 8bbaaad

Please sign in to comment.