fix(editor): Fix blank Public API page (#9409)

This commit is contained in:
Iván Ovejero 2024-05-15 17:35:30 +02:00 committed by GitHub
parent 68a6c81729
commit 14fe9f268f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,7 +165,9 @@ export default defineComponent({
return this.canUserAccessRouteByName(VIEWS.COMMUNITY_NODES);
},
canAccessApiSettings(): boolean {
return this.canUserAccessRouteByName(VIEWS.API_SETTINGS);
return (
this.settingsStore.isPublicApiEnabled && this.canUserAccessRouteByName(VIEWS.API_SETTINGS)
);
},
canAccessLdapSettings(): boolean {
return this.canUserAccessRouteByName(VIEWS.LDAP_SETTINGS);