<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/domain, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>python:domain:user Add altSecurityIdentities</title>
<updated>2025-10-10T01:27:31+00:00</updated>
<author>
<name>Gary Lockyer</name>
<email>gary@catalyst.net.nz</email>
</author>
<published>2025-09-22T03:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f9d9f559d99457aaaf0902badb0b56a5749b95d8'/>
<id>f9d9f559d99457aaaf0902badb0b56a5749b95d8</id>
<content type='text'>
Add altSecurityIdentities to the User domain model so that it can be used by
the key certificate binding enforcement tests.

Signed-off-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Reviewed-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add altSecurityIdentities to the User domain model so that it can be used by
the key certificate binding enforcement tests.

Signed-off-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Reviewed-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:models: do not re-use mutable defaults</title>
<updated>2025-08-20T04:34:37+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-08-13T05:19:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=439146c7a0ff362e2247feb94f2228edccea36be'/>
<id>439146c7a0ff362e2247feb94f2228edccea36be</id>
<content type='text'>
This ensures that model.save works when a field has the many flag set,
but the object has no attribute of that name, and the caller appends
to the attribute list, like this:

      user.key_credential_link.append(link)

When we get to save, and are doing this:

      value = getattr(self, attr)
      old_value = getattr(existing_obj, attr)
      if value != old_value:
         # commit the change

the .append() will have added the item to both value and old_value
because they are the same list. But not any more.

This was a problem because the Field instance is attached to the
model class, not the model instance.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that model.save works when a field has the many flag set,
but the object has no attribute of that name, and the caller appends
to the attribute list, like this:

      user.key_credential_link.append(link)

When we get to save, and are doing this:

      value = getattr(self, attr)
      old_value = getattr(existing_obj, attr)
      if value != old_value:
         # commit the change

the .append() will have added the item to both value and old_value
because they are the same list. But not any more.

This was a problem because the Field instance is attached to the
model class, not the model instance.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:models: add key credential link DN to domain fields</title>
<updated>2025-08-13T02:53:44+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-08-06T02:00:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6a1dc25421ba1e927bf758c0ea80e2c08e350113'/>
<id>6a1dc25421ba1e927bf758c0ea80e2c08e350113</id>
<content type='text'>
This will soon be needed by samba-tool, and is also going to be used
in some tests.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will soon be needed by samba-tool, and is also going to be used
in some tests.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: models: add get_primary_group method to User model</title>
<updated>2024-05-10T00:26:35+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-04-30T11:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8fe7f0a6d507c4711c9edbc8eab86cf0a46facaf'/>
<id>8fe7f0a6d507c4711c9edbc8eab86cf0a46facaf</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: models: rename argument ldb to samdb</title>
<updated>2024-05-10T00:26:35+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-04-30T11:42:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=1f47c0f609355aa469c04dafe6c4505f5823a6e3'/>
<id>1f47c0f609355aa469c04dafe6c4505f5823a6e3</id>
<content type='text'>
This argument is actually an instance of SamDB (which inherits from Ldb).

This should have been called samdb.

Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This argument is actually an instance of SamDB (which inherits from Ldb).

This should have been called samdb.

Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: domain: models: add OrganizationalUnit container model</title>
<updated>2024-03-28T01:50:41+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-03-21T22:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=828420b4f0984e1bca45c340fe0df8c10cfd5e79'/>
<id>828420b4f0984e1bca45c340fe0df8c10cfd5e79</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: domain: models: move OrganizationalPerson to org.py</title>
<updated>2024-03-28T01:50:41+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-03-21T22:33:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5ac4b6969be802a3cdefff4f36b5542a94736295'/>
<id>5ac4b6969be802a3cdefff4f36b5542a94736295</id>
<content type='text'>
There are other models like OrganizationalUnit which can go in org.py better if this is done first

Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are other models like OrganizationalUnit which can go in org.py better if this is done first

Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: domain: models: move MODELS to registry.py because it's not really a constant</title>
<updated>2024-03-28T01:50:41+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-03-21T22:02:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3c0833ead5180492d958af66ad94db392e87ed07'/>
<id>3c0833ead5180492d958af66ad94db392e87ed07</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: domain: models: MODELS lookup does need to include base Model for shell command</title>
<updated>2024-03-28T01:50:41+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-03-25T19:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=bfd1f8cd467d081eac4dbdd3bd0e90ca1a7de1a0'/>
<id>bfd1f8cd467d081eac4dbdd3bd0e90ca1a7de1a0</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: domain: models: add children method to return a models direct children</title>
<updated>2024-03-28T01:50:41+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2024-03-25T19:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0c5d09ae14311f18deb3b1a5013152b4c26eb161'/>
<id>0c5d09ae14311f18deb3b1a5013152b4c26eb161</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
