MINOR: cli: create new function cli_has_level() to validate permissions

This function is used to check that the CLI features the appropriate
level of permissions or to prepare the adequate error message.
2 files changed