BootTrait - If no active user is given, then run CLI as superuser #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Example:
cv api4
command tended to complain because the default/unauthenticated condition was to fail the permission check.cv api4
currently has a work-around to setcheckPermissions=>FALSE
, although this wouldn't apply if you usedcv ev civicrm_api4(...);
ang:module:list
has problems listing CiviMail modules b/c they have a funny perm check.I think this may actually be better than the current workaround in
api4
, e.g.checkPermissions => FALSE
means that it never checks permissions.cv api4 Contact.get
would run without permission checks... but if you specifiedcv api4 Contact.get -U alice
, then it would apply the permissions of the named user.I haven't tested the impact on that api4 use-case. I initially wanted to improve the
ang:module:list
case, but something else in CiviMail still makes that funky.This could be a change if someone has a custom-script that is intended to run as anonymous+unprivileged user (
cv scr my-script.php
), although I suspect that's the exception rather the rule.Anyway, I'm just gonna file the PR and the let idea gel a bit more.