We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dffb132 commit fcb949cCopy full SHA for fcb949c
1 file changed
apps/files/src/newMenu/newFromTemplate.ts
@@ -62,7 +62,13 @@ export function registerTemplateEntries() {
62
iconClass: provider.iconClass || 'icon-file',
63
iconSvgInline: provider.iconSvgInline,
64
enabled(context: Folder): boolean {
65
- return (context.permissions & Permission.CREATE) !== 0
+ if (context.attributes['is-encrypted']) {
66
+ return false
67
+ }
68
+
69
+ // templates are only supported in folders where the user has read and create permissions
70
+ return (context.permissions & Permission.READ) !== 0
71
+ && (context.permissions & Permission.CREATE) !== 0
72
},
73
order: 11,
74
async handler(context: Folder, content: Node[]) {
0 commit comments