(grants = {})
| 884 | )); |
| 885 | |
| 886 | const hasExplicit = (grants = {}) => { |
| 887 | if (grants.__explicit || grants.explicit) return true; |
| 888 | const caps = [ |
| 889 | 'view', 'viewOwn', 'manage', 'create', 'upload', 'edit', 'rename', |
| 890 | 'copy', 'move', 'delete', 'extract', 'shareFile', 'shareFolder', |
| 891 | 'write', 'share', 'share_file', 'share_folder', 'owners', 'read', 'read_own' |
| 892 | ]; |
| 893 | return caps.some(k => !!grants[k]); |
| 894 | }; |
| 895 | |
| 896 | const expandCaps = (grants = {}) => { |
| 897 | const caps = {}; |
no outgoing calls
no test coverage detected