boomerdigital / solidus_user_roles

Advanced user roles for Solidus.
http://www.boomerdigital.net
BSD 3-Clause "New" or "Revised" License
17 stars 22 forks source link

Taxon management unauthorized even with ProductManagement permission set. #18

Open mathportillo opened 6 years ago

mathportillo commented 6 years ago

How to reproduce:

The result is "Unauthorized" when it should be authorized normally.

Details:

here is the logs:

Started PUT "/api/taxonomies/1/taxons/8" for 130.211.3.31 at 2018-06-25 12:43:29 +0000
Processing by Spree::Api::TaxonsController#update as JSON
  Parameters: {"taxon"=>{"parent_id"=>"1", "child_index"=>"7"}, "taxonomy_id"=>"1", "id"=>"8"}
  Spree::User Load (1.0ms)  SELECT  "spree_users".* FROM "spree_users" WHERE "spree_users"."deleted_at" IS NULL AND "spree_users"."spree_api_key" = $1 LIMIT $2  [["spree_api_key", ""], ["LIMIT", 1]]
  Spree::Taxonomy Load (0.9ms)  SELECT  "spree_taxonomies".* FROM "spree_taxonomies" WHERE "spree_taxonomies"."id" = $1 ORDER BY "spree_taxonomies"."position" ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
  Spree::Taxon Load (0.9ms)  SELECT  "spree_taxons".* FROM "spree_taxons" WHERE "spree_taxons"."taxonomy_id" = $1 AND "spree_taxons"."id" = $2 LIMIT $3  [["taxonomy_id", 1], ["id", 8], ["LIMIT", 1]]
  Rendering /opt/gem/ruby/2.3.0/gems/solidus_api-2.3.1/app/views/spree/api/errors/unauthorized.v1.rabl
  Rendered /opt/gem/ruby/2.3.0/gems/solidus_api-2.3.1/app/views/spree/api/errors/unauthorized.v1.rabl (0.8ms)
Completed 401 Unauthorized in 17ms (Views: 2.0ms | ActiveRecord: 2.8ms)