(
parentAgentId: string | null,
input?: PermissionManagerOptions | undefined,
)
| 836 | } |
| 837 | |
| 838 | private permissionOptions( |
| 839 | parentAgentId: string | null, |
| 840 | input?: PermissionManagerOptions | undefined, |
| 841 | ): PermissionManagerOptions { |
| 842 | if (parentAgentId === null) { |
| 843 | return { |
| 844 | ...input, |
| 845 | initialRules: input?.initialRules ?? this.options.permissionRules, |
| 846 | }; |
| 847 | } |
| 848 | return { |
| 849 | ...input, |
| 850 | parent: input?.parent ?? this.getReadyAgent(parentAgentId)?.permission, |
| 851 | }; |
| 852 | } |
| 853 | |
| 854 | getReadyAgent(id: string): Agent | undefined { |
| 855 | const entry = this.agents.get(id); |
no test coverage detected