Jam.py documentation

can_create

can_create(self)

domain: server

language: python

class AbstractItem class

Description

Use the can_create method to determine whether a user of the current session have a right to create a new record.

Example

def send_email(item, selected, subject, mess):
    if not item.can_create():
        raise Exception('You are not allowed to send emails.')
    #code sending email