Skip to content

Commit

Permalink
Check to see if the user has access to create namespaces before displ…
Browse files Browse the repository at this point in the history
…aying the create namespace button

#3875
  • Loading branch information
codyrancher committed Oct 23, 2021
1 parent 6f9a94a commit eb3f54a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/c/_cluster/_product/projectsnamespaces.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export default {
},
computed: {
isNamespaceCreatable() {
return (this.schema?.resourceMethods || []).includes('PUT');
},
headers() {
const project = {
name: 'project',
Expand Down Expand Up @@ -202,6 +205,7 @@ export default {
</div>
<div class="right">
<n-link
v-if="isNamespaceCreatable"
class="create-namespace btn btn-sm role-secondary"
:to="createNamespaceLocation(group.group)"
>
Expand Down

0 comments on commit eb3f54a

Please sign in to comment.