can_create

can_create(self)

使用范围: server

编程语言: python

父类: AbstractItem 类

描述说明

使用 can_create 方法以确定当前会话的用户是否有权限创建新记录。

示例

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

另请参见

角色

session

can_view

can_create

can_edit

can_delete