Appearance
Policy Recipes: Files Tab
Task-oriented Files tab recipes you can copy/paste. These recipes control how files appear and which operations are allowed in the Files tab.
What You'll Learn
- How to define reusable
fileTypesfor risk categories - How to block or hide specific file types in the Files tab
- How to separate list and import behavior using file policies
Files Tab Recipes
These recipes configure fileTypes and files policies for the Files tab.
Block Importing Executables
Deny importing risky file types using a shared fileTypes registry entry.
json
{
"fileTypes": [
{
"id": "executable",
"displayName": "Executables",
"match": { "extensions": ["exe","dll","msi","bat","cmd","ps1"] }
}
],
"files": [
{
"id": "deny-import-executables",
"displayName": "Block importing executables",
"enabled": true,
"priority": 1000,
"operation": "import",
"fileTypeRef": "executable",
"action": "deny"
}
]
}Validate:
- Attempting to import any file that resolves to the
executablefileTypeis denied. - The user sees an informative message explaining that executable imports are blocked.
Hide Temporary/Backup Files From Listing
Hide temporary and backup file types from appearing in the Files tab listing.
json
{
"fileTypes": [
{
"id": "temp-and-backups",
"displayName": "Temporary/backup files",
"match": { "extensions": ["tmp","bak","log"] }
}
],
"files": [
{
"id": "hide-temp-and-backups",
"displayName": "Hide temporary/backup files",
"enabled": true,
"priority": 900,
"operation": "list",
"fileTypeRef": "temp-and-backups",
"action": "deny"
}
]
}Validate:
- Matching
.tmp,.bak, and.logfiles do not appear in the Files tab. - Other file types still appear and behave as expected.
Quick Authoring Checklist (Files Tab)
- Define
fileTypesonce for each risk or category you want to manage (for example,executable,temp-and-backups). - Use
files[].operationto control specific operations:listfor visibility.import/exportfor movement into or out of the Files tab.open/deletewhere applicable.
- Use
priorityto ensure stricter policies (for example, deny rules for risky types) win over more general entries.
Related Topics
See also:
