Sha256: 4fe6e097d89dcf17db94446f5af00a55210c3822ef1058bc917737a748f4a6d9
Contents?: true
Size: 949 Bytes
Versions: 62
Compression:
Stored size: 949 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] render text: "Yay!" # 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
62 entries across 32 versions & 2 rubygems