This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/controllers/admin/app_auths_controller.rb

28 lines
689 B
Ruby

class Admin::AppAuthsController < ApplicationController
layout "admin"
before_filter :authenticate_user!
# before_filter :is_admin? ,:only => :index
def index
# @roles = Role.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
if current_user.admin?
@module_apps = ModuleApp.all
else
@module_apps = current_user.managing_apps.collect{|t| t.managing_app}
end
end
def edit
@module_app = ModuleApp.find(params[:id])
end
end