==========
can_create
==========

.. py:method:: can_create(self) 

**domain**: server

**language**: python

**class** :doc:`AbstractItem class </refs/server/abstractitem_api>`

Description
===========

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

Example
=======

.. code-block:: py

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

See also
========

:doc:`Roles </admin/roles>`

:doc:`session </refs/server/abstr_item/at_session>`

:doc:`can_view </refs/server/abstr_item/m_can_view>`

:doc:`can_create <m_can_create>`

:doc:`can_edit <m_can_edit>`

:doc:`can_delete <m_can_delete>`

