(self, user, permission)
return self._get_ace(permission=permission, user=user)
Check if the user has a specific permission.

        Args:
            user: A user (Instance of timesketch.models.user.User)
            permission: Permission as string (read, write or delete)

        Returns:
            An ACE (instance of timesketch.models.acl.AccessControlEntry) if the
            user has the permission or None if the user do not have the
            permission.
Check if the user has a specific permission.
Check if the user has a specific permission .
def has_permission(self, user, permission):
        """Check if the user has a specific permission.

        Args:
            user: A user (Instance of timesketch.models.user.User)
            permission: Permission as string (read, write or delete)

        Returns:
            An ACE (instance of timesketch.models.acl.AccessControlEntry) if the
            user has the permission or None if the user do not have the
            permission.
        """
        public_ace = self.is_public
        if public_ace and permission == 'read':
            return public_ace
        if isinstance(permission, six.binary_type):
            permission = codecs.decode(permission, 'utf-8')
        return self._get_ace(permission=permission, user=user)
def has_permission ( self , user , permission ) : public_ace = self . is_public if public_ace and permission == 'read' : return public_ace if isinstance ( permission , six . binary_type ) : permission = codecs . decode ( permission , 'utf-8' ) return self . _get_ace ( permission = permission , user = user )