You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#collection does not check the current admin's abilities and returns all users. It can probably be fixed by using super.ransack... which makes use of #accessible_by.
#set_roles checks the general ability but not the roles given in params. I.e. a role that can't be managed could be given to a user by manually passing its id in params.
#collection
does not check the current admin's abilities and returns all users. It can probably be fixed by usingsuper.ransack...
which makes use of#accessible_by
.solidus/backend/app/controllers/spree/admin/users_controller.rb
Line 127 in 4079b58
Similar issue for
#load_roles
,#load_stock_locations
&#set_stock_locations
, thoughsuper
wouldn't cut it in these cases.solidus/backend/app/controllers/spree/admin/users_controller.rb
Lines 163 to 164 in 4079b58
solidus/backend/app/controllers/spree/admin/users_controller.rb
Lines 170 to 171 in 4079b58
#load_stock_locations
also doesn't respectuser_params
and usesparams
directly instead.solidus/backend/app/controllers/spree/admin/users_controller.rb
Lines 180 to 181 in 4079b58
#set_roles
checks the general ability but not the roles given in params. I.e. a role that can't be managed could be given to a user by manually passing its id in params.solidus/backend/app/controllers/spree/admin/users_controller.rb
Lines 175 to 176 in 4079b58
Solidus Version:
2.10.1
To Reproduce
In Admin > Users, with an admin whose permissions defined as:
Current behavior
foo? => true
are listedbar? => true
are included in Search > Roles, New User > Roles etc.bar? => true
can be assigned to a userExpected behavior
foo? => true
are not listedbar? => true
are excluded from Search > Roles, New User > Roles etc.bar? => true
cannot be assigned to a userThe text was updated successfully, but these errors were encountered: