[katello-devel] Merging ActiveRecord RBAC into the master

Lukas Zapletal lzap at redhat.com
Fri May 27 15:00:33 UTC 2011


Hello,

I am going to merge my AR RBAC work into the master. You will need to do

# rake setup

again. Or you can run this in the rails console if you want:

ActiveRecord::Base.connection.tables.each do |t|
   Role.allow 'admin_role', [:create, :edit, :destroy], t
end

The approach is "everybody can do everything". I did my best to test 
everything, unit tests are green, CLI works, UI works. Well product 
creation and system registration do not work (but in master too).

This change affects lots of things and can cause issues. If you will run 
into permission-related issue you can turn AR RBAC by returning "false" 
in the Authorization#enforce? method. But it should be fine.

I will be adding permission rules now.

Since its Friday I am keeping online - please test ASAP :-)

ps - I have created

scripts/tests/katello-cli-simple-test.sh

that runs some very basic commands (adds provider, product, sync 
product, register system). Feel free to add your own commands here but 
keep it idempotent. We should be able to run it multiple times without 
clearing the database. Which means - clean what you did or create things 
with "random" names.

I use the script prior pushing to the master.

-- 
Later,

  Lukas Zapletal | E32E400A
  RHN Satellite Engineering
  Red Hat Czech s.r.o. Brno




More information about the katello-devel mailing list