LPS-40597 Apply to rest
LPS-40597 Missing default permission and original logic was wrong