Revert "[lib] Deprecate updateRolesAndPermissions"
This reverts commit ad00e828654785c0a3d2e040a60fea13c26e307c.