:tocdepth: 3 :py:mod:`gws.plugin.model_field.integer` ======================================== .. py:module:: gws.plugin.model_field.integer .. autoapi-nested-parse:: Integer field. **Source code:** :source:`gws.plugin.model_field.integer` Package Contents ---------------- .. py:class:: Config Bases: :py:obj:`gws.base.model.scalar_field.Config` .. py:class:: Object Bases: :py:obj:`gws.base.model.scalar_field.Object` .. py:attribute:: attributeType .. py:method:: configure_widget() .. py:method:: convert(val, mc) .. py:class:: Props Bases: :py:obj:`gws.base.model.scalar_field.Props` .. py:class:: User Bases: :py:obj:`Object` User object. .. py:attribute:: attributes :type: dict Public user attributes. .. py:attribute:: authProvider :type: AuthProvider User authorization provider. .. py:attribute:: authToken :type: str Token used for authorization. .. py:attribute:: data :type: dict Private user data. .. py:attribute:: displayName :type: str User display name. .. py:attribute:: email :type: str User email. .. py:attribute:: isGuest :type: bool User is a Guest. .. py:attribute:: localUid :type: str User uid within its authorization provider. .. py:attribute:: loginName :type: str User login name. .. py:attribute:: mfaSecret :type: str MFA secret. .. py:attribute:: mfaUid :type: str MFA adapter uid. .. py:attribute:: roles :type: set[str] User roles. .. py:attribute:: uid :type: str Global user uid. .. py:method:: acl_bit(access: Access, obj: Object) -> Optional[int] Get the ACL bit for a specific object. :param access: Access mode. :param obj: Requested object. :returns: ``1`` or ``0`` if the user's permissions have the bit and ``None`` otherwise. .. py:method:: acquire(uid: str = None, classref: Optional[ClassRef] = None, access: Optional[Access] = None) -> Optional[Object] Get a readable object by uid. :param uid: Object uid. :param classref: Class reference. If provided, ensures that the object matches the reference. :param access: Access mode, assumed ``Access.read`` if omitted. :returns: A readable object or ``None`` if the object does not exists or user doesn't have a permission. .. py:method:: can(access: Access, obj: Object, *context) -> bool Check if the user can access an object. :param access: Access mode. :param obj: Requested object. :param \*context: Further objects to check. :returns: ``True`` is access is granted. .. py:method:: can_create(obj: Object, *context) -> bool Check if the user has "create" permission on an object. .. py:method:: can_delete(obj: Object, *context) -> bool Check if the user has "delete" permission on an object. .. py:method:: can_edit(obj: Object, *context) -> bool Check if the user has "edit" permissions on an object. .. py:method:: can_read(obj: Object, *context) -> bool Check if the user has "read" permission on an object. .. py:method:: can_use(obj: Object, *context) -> bool Check if the user has "read" permission on an object. .. py:method:: can_write(obj: Object, *context) -> bool Check if the user has "write" permission on an object. .. py:method:: require(uid: str = None, classref: Optional[ClassRef] = None, access: Optional[Access] = None) -> Object Get a readable object by uid and fail if not found. :param uid: Object uid. :param classref: Class reference. If provided, ensures that the object matches the reference. :param access: Access mode, assumed ``Access.read`` if omitted. :returns: A readable object. :raises ``NotFoundError`` if the object doesn't exist.: :raises ``ForbiddenError`` if the user cannot read the object.: .. py:method:: require_layer(uid=None) -> Layer Get a readable Layer object. :param uid: Layer uid. :returns: A Layer object. .. py:method:: require_project(uid: str = None) -> Project Get a readable Project object. :param uid: Project uid. :returns: A Project object.