Class: Kaltura::KalturaPermissionService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Permission service lets you create and manage user permissions

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaPermissionService

Returns a new instance of KalturaPermissionService.



3726
3727
3728
# File 'lib/kaltura_client.rb', line 3726

def initialize(client)
	super(client)
end

Instance Method Details

#add(permission) ⇒ KalturaPermission

Adds a new permission object to the account.

Returns:



3732
3733
3734
3735
3736
3737
3738
3739
3740
# File 'lib/kaltura_client.rb', line 3732

def add(permission)
	kparams = {}
	client.add_param(kparams, 'permission', permission)
	client.queue_service_action_call('permission', 'add', 'KalturaPermission', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(permission_name) ⇒ KalturaPermission

Deletes an existing permission object.

Returns:



3744
3745
3746
3747
3748
3749
3750
3751
3752
# File 'lib/kaltura_client.rb', line 3744

def delete(permission_name)
	kparams = {}
	client.add_param(kparams, 'permissionName', permission_name)
	client.queue_service_action_call('permission', 'delete', 'KalturaPermission', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(permission_name) ⇒ KalturaPermission

Retrieves a permission object using its ID.

Returns:



3756
3757
3758
3759
3760
3761
3762
3763
3764
# File 'lib/kaltura_client.rb', line 3756

def get(permission_name)
	kparams = {}
	client.add_param(kparams, 'permissionName', permission_name)
	client.queue_service_action_call('permission', 'get', 'KalturaPermission', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_current_permissionsstring

Retrieves a list of permissions that apply to the current KS.

Returns:

  • (string)


3768
3769
3770
3771
3772
3773
3774
3775
# File 'lib/kaltura_client.rb', line 3768

def get_current_permissions()
	kparams = {}
	client.queue_service_action_call('permission', 'getCurrentPermissions', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaPermissionListResponse

Lists permission objects that are associated with an account. Blocked permissions are listed unless you use a filter to exclude them. Blocked permissions are listed unless you use a filter to exclude them.



3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
# File 'lib/kaltura_client.rb', line 3781

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('permission', 'list', 'KalturaPermissionListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(permission_name, permission) ⇒ KalturaPermission

Updates an existing permission object.

Returns:



3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
# File 'lib/kaltura_client.rb', line 3794

def update(permission_name, permission)
	kparams = {}
	client.add_param(kparams, 'permissionName', permission_name)
	client.add_param(kparams, 'permission', permission)
	client.queue_service_action_call('permission', 'update', 'KalturaPermission', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end