(self, permission, user=None, group=None)
Grant permission to a user or group  with the specific permission.

        Args:
            permission: Permission as string (read, write or delete)
            user: A user (Instance of timesketch.models.user.User)
            group: A group (Instance of timesketch.models.user.Group)
Grant permission to a user or group  with the specific permission.
Grant permission to a user or group with the specific permission .
def grant_permission(self, permission, user=None, group=None):
        """Grant permission to a user or group  with the specific permission.

        Args:
            permission: Permission as string (read, write or delete)
            user: A user (Instance of timesketch.models.user.User)
            group: A group (Instance of timesketch.models.user.Group)
        """
        # Grant permission to a group.
        if group and not self._get_ace(permission, group=group):
            self.acl.append(
                self.AccessControlEntry(permission=permission, group=group))
            db_session.commit()
            return

        # Grant permission to a user.
        if not self._get_ace(permission, user=user, check_group=False):
            self.acl.append(
                self.AccessControlEntry(permission=permission, user=user))
            db_session.commit()
def grant_permission ( self , permission , user = None , group = None ) : # Grant permission to a group. if group and not self . _get_ace ( permission , group = group ) : self . acl . append ( self . AccessControlEntry ( permission = permission , group = group ) ) db_session . commit ( ) return # Grant permission to a user. if not self . _get_ace ( permission , user = user , check_group = False ) : self . acl . append ( self . AccessControlEntry ( permission = permission , user = user ) ) db_session . commit ( )