domain: server
language: python
class AbstractItem class
Use the can_create
method to determine whether a user of the current session
have a right to create a new record.
def send_email(item, selected, subject, mess):
if not item.can_create():
raise Exception('You are not allowed to send emails.')
#code sending email