[x] I have reviewed the OFRAK contributor guide and attest that this pull request is in accordance with it.
One sentence summary of this PR (This should go in the CHANGELOG!)
Add license check to OFRAK. Just CLI license check included for now. Not meant to be airtight (since there are a million ways to bypass it at this point), just to prompt users to think about the license on first run.
flowchart TD
subgraph download [Run OFRAK for the first time]
script[Run script] & config["Run `ofrak configure` command"]
run_gui[Run GUI]
end
script & config --> |CLI license flow| flow
run_gui --> |GUI license flow| flow
subgraph flow [License flow]
subgraph validate [Validate the license]
direction TB
display[Print license type to standard output] --> check_sig[Validate license signature]
check_sig --> confirm_date[Confirm the license has not expired]
end
validate --> |Valid license| continue[Continue running the original script/task]
validate --> |Invalid or expired license| error[Display an error and abort]
check[Check for license in expected location] --> |License exists| validate
check --> |License does not exist| type[Choose Community or Pro License]
type --> |Community| comunity_agree[Prompt to accept license agreement]
--> write_disk[Write Community License to expected location on disk]
--> validate
type --> |Pro| locate_or_obtain[Prompt to locate a license on disk or obtain one]
--> |Locate on disk| locate[Input path to license]
--> pro_agree[Prompt to accept license agreement]
--> copy[Copy license to expected location on disk]
locate_or_obtain ----> |Obtain license| obtain[Request license on OFRAK website]
--> call[Have a call with RBS and get full or trial license]
copy --> validate
end
One sentence summary of this PR (This should go in the CHANGELOG!)
Add license check to OFRAK. Just CLI license check included for now. Not meant to be airtight (since there are a million ways to bypass it at this point), just to prompt users to think about the license on first run.