File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
portal-ui/src/screens/Console Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -190,9 +190,10 @@ const ListBuckets = ({
190
190
return null ;
191
191
} ;
192
192
193
- const createBucketButtonResources : string [ ] = session
194
- ? Array . from ( Object . keys ( session . permissions ) ) || [ ]
195
- : [ ] ;
193
+ const createBucketButtonResources : string [ ] =
194
+ session && session . permissions
195
+ ? Array . from ( Object . keys ( session . permissions ) ) || [ ]
196
+ : [ ] ;
196
197
197
198
return (
198
199
< Fragment >
Original file line number Diff line number Diff line change @@ -219,9 +219,10 @@ const Console = ({
219
219
component : Buckets ,
220
220
path : IAM_PAGES . ADD_BUCKETS ,
221
221
customPermissionFnc : ( ) => {
222
- const createBucketResources : string [ ] = session
223
- ? Array . from ( Object . keys ( session . permissions ) ) || [ ]
224
- : [ ] ;
222
+ const createBucketResources : string [ ] =
223
+ session && session . permissions
224
+ ? Array . from ( Object . keys ( session . permissions ) ) || [ ]
225
+ : [ ] ;
225
226
return hasPermission (
226
227
createBucketResources ,
227
228
IAM_PAGES_PERMISSIONS [ IAM_PAGES . ADD_BUCKETS ]
You can’t perform that action at this time.
0 commit comments