mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 20:24:03 +00:00
First checkin
This commit is contained in:
parent
f207e2c8b7
commit
90b30db9e8
260 changed files with 37349 additions and 0 deletions
20
app/controllers/admin/users_controller.rb
Normal file
20
app/controllers/admin/users_controller.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class Admin::UsersController < ApplicationController
|
||||
before_filter :verify_admin
|
||||
layout "admin"
|
||||
|
||||
def index
|
||||
@users = User.all(:joins => :person,
|
||||
:order => "people.last_name ASC",
|
||||
:select => "users.*,
|
||||
people.last_name AS last_name,
|
||||
people.first_name AS first_name,
|
||||
people.public_name AS public_name,
|
||||
people.email AS email")
|
||||
end
|
||||
|
||||
def update
|
||||
user = User.find(params[:id])
|
||||
user.update_attributes!(params[:user])
|
||||
redirect_to admin_users_path, :notice => "Updated #{user.email}"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue