Sha256: 40db1f2b0ac44e921bd710f0c07017756605df9ff2080025677d50fd0d5a7a13

Contents?: true

Size: 602 Bytes

Versions: 21

Compression:

Stored size: 602 Bytes

Contents

class Maestrano::Account::GroupsController < Maestrano::Rails::WebHookController
  
  # DELETE /maestrano/account/groups/cld-1
  # DELETE /maestrano/account/groups/cld-1/tenant
  # Delete an entire group
  def destroy
    # id
    org_uid = params[:id]
    
    # Get entity
    organization = Maestrano::Connector::Rails::Organization.find_by_uid_and_tenant(org_uid, params[:tenant] || 'default')
    
    # Delete all relations
    organization.user_organization_rels.delete_all
    
    # Delete the organization
    organization.destroy
    
    # Respond
    render json: {success: true}
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
maestrano-connector-rails-1.2.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.2.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.1.2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.1.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.1.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.0.4 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.0.3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.0.2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.0.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.0.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.4.4 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.4.3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.4.2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.4.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.4.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.13 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.12 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.11 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.10 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.9 app/controllers/maestrano/account/groups_controller.rb