Added final permission generation