Class: DirectoryController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- DirectoryController
- Defined in:
- app/controllers/directory_controller.rb
Overview
Copyright © 2012 The Pennsylvania State University
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Instance Method Summary collapse
-
#group ⇒ Object
Stub method.
-
#user ⇒ Object
Stub method.
-
#user_attribute ⇒ Object
Stub method.
-
#user_groups ⇒ Object
Stub method.
Instance Method Details
#group ⇒ Object
Stub method. Override this in your application if you want directory lookups
41 42 43 44 |
# File 'app/controllers/directory_controller.rb', line 41 def group #render :json => Group.exists?(params[:cn]) render :json => false end |
#user ⇒ Object
Stub method. Override this in your application if you want directory lookups
18 19 20 21 |
# File 'app/controllers/directory_controller.rb', line 18 def user #render :json => User.directory_attributes(params[:uid]) render :json => "" end |
#user_attribute ⇒ Object
Stub method. Override this in your application if you want directory lookups
24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/directory_controller.rb', line 24 def user_attribute # if params[:attribute] == "groups" # res = User.groups(params[:uid]) # else # res = User.directory_attributes(params[:uid], params[:attribute]) # end # render :json => res render :json => "" end |
#user_groups ⇒ Object
Stub method. Override this in your application if you want directory lookups
35 36 37 38 |
# File 'app/controllers/directory_controller.rb', line 35 def user_groups # render :json => User.groups(params[:uid]) render :json => [] end |