Updated Device Controller to properly check if user can modify device