Class ClaudePermissionChecker
Checks and prompts for permission to run Claude CLI with elevated permissions.
public class ClaudePermissionChecker
- Inheritance
-
ClaudePermissionChecker
- Inherited Members
Constructors
ClaudePermissionChecker(IBuildLogger)
public ClaudePermissionChecker(IBuildLogger logger)
Parameters
loggerIBuildLogger
Methods
CheckAndPrompt(string, string)
Checks if Claude permission is granted and prompts the user if needed.
public ClaudePermissionResult CheckAndPrompt(string projectRoot, string commandName)
Parameters
projectRootstringThe project root directory for config file access.
commandNamestringThe command requesting Claude access (for display).
Returns
- ClaudePermissionResult
The result indicating whether Claude can be used.
IsAllowed(ClaudePermissionResult)
Determines whether Claude can be used based on the check result.
public static bool IsAllowed(ClaudePermissionResult result)
Parameters
resultClaudePermissionResultThe result from CheckAndPrompt.
Returns
- bool
True if Claude can be used, false otherwise.