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.



12283
12284
12285
# File 'lib/kaltura_client.rb', line 12283

def initialize(client)
	super(client)
end

Instance Method Details

#add(permission) ⇒ Object

Adds a new permission object to the account.



12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
# File 'lib/kaltura_client.rb', line 12289

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

#delete(permission_name) ⇒ Object

Deletes an existing permission object.



12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
# File 'lib/kaltura_client.rb', line 12330

def delete(permission_name)
	kparams = {}
	# The name assigned to the permission
	client.add_param(kparams, 'permissionName', permission_name);
	client.queue_service_action_call('permission', 'delete', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get(permission_name) ⇒ Object

Retrieves a permission object using its ID.



12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
# File 'lib/kaltura_client.rb', line 12302

def get(permission_name)
	kparams = {}
	# The name assigned to the permission
	client.add_param(kparams, 'permissionName', permission_name);
	client.queue_service_action_call('permission', 'get', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_current_permissionsObject

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



12360
12361
12362
12363
12364
12365
12366
12367
# File 'lib/kaltura_client.rb', line 12360

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

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

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.



12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
# File 'lib/kaltura_client.rb', line 12345

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	# A filter used to exclude specific types of permissions
	client.add_param(kparams, 'filter', filter);
	# A limit for the number of records to display on a page
	client.add_param(kparams, 'pager', pager);
	client.queue_service_action_call('permission', 'list', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update(permission_name, permission) ⇒ Object

Updates an existing permission object.



12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
# File 'lib/kaltura_client.rb', line 12315

def update(permission_name, permission)
	kparams = {}
	# The name assigned to the permission
	client.add_param(kparams, 'permissionName', permission_name);
	# Name The name assigned to the permission
	client.add_param(kparams, 'permission', permission);
	client.queue_service_action_call('permission', 'update', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end