Class: GraphStarter::AuthorizablesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- GraphStarter::AuthorizablesController
- Defined in:
- app/controllers/graph_starter/authorizables_controller.rb
Instance Method Summary collapse
- #access_levels_from_permissions(permissions, type) ⇒ Object
- #change_permissions_modal ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
- #user_and_group_search ⇒ Object
Instance Method Details
#access_levels_from_permissions(permissions, type) ⇒ Object
22 23 24 25 26 |
# File 'app/controllers/graph_starter/authorizables_controller.rb', line 22 def (, type) ( || []).each_with_object({}) do |, result| result[[type][:id]] = [:level] end end |
#change_permissions_modal ⇒ Object
37 38 39 |
# File 'app/controllers/graph_starter/authorizables_controller.rb', line 37 def render layout: false end |
#show ⇒ Object
7 8 |
# File 'app/controllers/graph_starter/authorizables_controller.rb', line 7 def show end |
#update ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/graph_starter/authorizables_controller.rb', line 10 def update @object.update_attribute(:private, params[:private]) @object.set_access_levels User, (params[:user_permissions], :user) @object.set_access_levels Group, (params[:group_permissions], :group) render :show end |