Redmine#4390: condition switch on perms check