Skip to content

Commit

Permalink
fix(commands): acl policy check errors on warnings (#7000)
Browse files Browse the repository at this point in the history
This fixes an issue where the authelia access-control check-policy command fails claiming errors when there are only warnings.

Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
  • Loading branch information
james-d-elliott committed Mar 23, 2024
1 parent 6aeb122 commit 4b24678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/commands/acl.go
Expand Up @@ -58,8 +58,8 @@ func newAccessControlCheckCommand(ctx *CmdCtx) (cmd *cobra.Command) {
func (ctx *CmdCtx) AccessControlCheckRunE(cmd *cobra.Command, _ []string) (err error) {
validator.ValidateAccessControl(ctx.config, ctx.cconfig.validator)

if ctx.cconfig.validator.HasErrors() || ctx.cconfig.validator.HasWarnings() {
return errors.New("your configuration has errors")
if ctx.cconfig.validator.HasErrors() {
return errors.New("failed to execute command due to errors in the configuration")
}

authorizer := authorization.NewAuthorizer(ctx.config)
Expand Down

0 comments on commit 4b24678

Please sign in to comment.