(sourceId)
| 810 | } |
| 811 | |
| 812 | function isLocalSourceId(sourceId) { |
| 813 | const sid = normalizeSourceId(sourceId); |
| 814 | if (!sid || sid === 'local') return true; |
| 815 | const data = __aclSourcesCache; |
| 816 | if (data && Array.isArray(data.sources)) { |
| 817 | const match = data.sources.find(src => String(src.id || '') === sid); |
| 818 | if (match) return String(match.type || '').toLowerCase() === 'local'; |
| 819 | } |
| 820 | return false; |
| 821 | } |
| 822 | |
| 823 | function pickGroupGrantsForSource(group, sourceId) { |
| 824 | if (!group || typeof group !== 'object') return {}; |
no test coverage detected