Sha256: ad2e6a0d013055e3205a9136739bc4809f662dd034caf3cb1bcf092dc0aa2890
Contents?: true
Size: 814 Bytes
Versions: 21
Compression:
Stored size: 814 Bytes
Contents
class Maestrano::Account::GroupUsersController < Maestrano::Rails::WebHookController # DELETE /maestrano/account/groups/cld-1/users/usr-1 # DELETE /maestrano/account/groups/cld-1/users/usr-1/tenant # 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] # Get the entities user = Maestrano::Connector::Rails::User.find_by_uid_and_tenant(user_uid, params[:tenant] || 'default') organization = Maestrano::Connector::Rails::Organization.find_by_uid_and_tenant(group_uid, params[:tenant] || 'default') # Remove the user from the organization organization.remove_member(user) render json: {success: true} end end
Version data entries
21 entries across 21 versions & 1 rubygems