createPermission

abstract suspend fun createPermission(fileId: String, permission: OmhCreatePermission, sendNotificationEmail: Boolean, emailMessage: String?): OmhPermission?

This method update permission role in a given file

Return

Created permission or null

Parameters

fileId

The file id with the permission

permission

The permission to be created

sendNotificationEmail

Whether to send a notification email when sharing to users or groups

emailMessage

A plain text custom message to include in the notification email

Throws

if permission was not created