feat(club): refine access control in loadOpenRequests method

- Added a check for access permissions before loading open requests to enhance security and prevent unauthorized access.
- Updated the mounted lifecycle hook to conditionally call loadOpenRequests based on access permissions, improving user experience and performance.
This commit is contained in:
Torsten Schulz (local)
2026-02-04 13:22:22 +01:00
parent e079fe4827
commit 9cb9ff511c

View File

@@ -135,6 +135,7 @@ export default {
},
async loadOpenRequests() {
try {
if (!this.accessAllowed) return;
const clubId = this.getClubId();
const response = await apiClient.get(`/clubmembers/notapproved/${clubId}`);
this.openRequests = response.data;
@@ -191,7 +192,9 @@ export default {
},
async mounted() {
await this.loadClub();
await this.loadOpenRequests();
if (this.accessAllowed) {
await this.loadOpenRequests();
}
}
}
</script>