title: check ldap access rights with python
body: <p>I am writing a web frontend (django) for an LDAP server. There are different kinds of people with different kinds of privileges, so I set up LDAP ACL to control who gets to see or edit a specific attribute.
  Now its easy to determine if a specific user has read access - try to read, and you will see what you get.
  But I don't see an elegant way to distinguish between read and write access <em>before</em> I actually try to write some changes. That is, I would like to make it clear in the interface, if the logged in user has write access, or can only read. So that users won't try to edit an attribute which they can not.</p>
  
  <p>The only thing that came to my mind was to try to temporarily write some sort of dummy into an attribute, and see if that was successful. If so, the original value would be restored, and I know that this user has write access. I can then display this attribute as editable.
  The problem with this is that if the server crashes after the dummy has been written and before the original value has been restored, I am left with dummy values in my LDAP server.</p>
  
  <p>What I would need is some way to query the ACLs, in a way similar that I can query schema definitions. But maybe that is "forbidden" by LDAP?</p>
  
  <p>Any ideas?</p>
  
  <p>Isaac</p>