finish the devise and cancancan setting