Ruling finds president exceeded his powers by imposing duties without clear authorization from Congress.