Orbit/app/controllers/admin/app_auths_controller.rb

17 lines
438 B
Ruby

class Admin::AppAuthsController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :is_admin?
def index
@user_roles = UserRole.all.entries
apps = Purchase.where(:type =>"App")
@app_auth_data = apps.entries.map do |app|
app_c = eval(app.app_controller)
obj = app_c.new
obj_auth = obj.send "auth"
[:app_obj => app,:auth_field => obj_auth]
end
end
end