Sha256: 7031a7215b2017baac688eec0537278d54677d9191652e93e50d1aa8054a8519
Contents?: true
Size: 925 Bytes
Versions: 14
Compression:
Stored size: 925 Bytes
Contents
class Maestrano::Account::GroupUsersController < Maestrano::Rails::WebHookController # DELETE /maestrano/account/groups/cld-1/users/usr-1 # Remove a user from a group def destroy # Set the right uid based on Maestrano.param('sso.creation_mode') user_uid = Maestrano.mask_user(params[:id],params[:group_id]) group_uid = params[:group_id] # Perform association deletion steps here # -- # If Maestrano.param('sso.creation_mode') is set to virtual # then you might want to just delete/cancel/block the user # # E.g # user = User.find_by_provider_and_uid('maestrano',user_uid) # organization = Organization.find_by_provider_and_uid('maestrano',group_uid) # # if Maestrano.param('sso.creation_mode') == 'virtual' # user.destroy # else # organization.remove_user(user) # user.block_access! if user.reload.organizations.empty? # end end end
Version data entries
14 entries across 14 versions & 2 rubygems