fix(editor): Only load suggested templates for owners (#8228)

## Summary
Title is self explanatory
This commit is contained in:
Ricardo Espinoza 2024-01-04 10:19:25 -05:00 committed by GitHub
parent 270328ccf6
commit 8f22a265d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,7 +198,7 @@ export const useCloudPlanStore = defineStore(STORES.CLOUD_PLAN, () => {
const localStorageFlag = localStorage.getItem(SUGGESTED_TEMPLATES_FLAG);
// Don't show if users already opted in
if (localStorageFlag !== 'false') {
if (localStorageFlag !== 'false' && hasPermission(['instanceOwner'])) {
await loadSuggestedTemplates();
}