Skip to content

Commit

Permalink
Merge pull request #4438 from codyrancher/namespace-create
Browse files Browse the repository at this point in the history
Check to see if the user has access to create namespaces before displaying the create namespace button
  • Loading branch information
codyrancher authored Oct 25, 2021
2 parents f3e99fe + eb3f54a commit a17c7de
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 a17c7de

Please sign in to comment.