<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<h3>
Imran Hussain pushed to branch master
at <a href="https://projects.sucs.org/sucs/accountmanager">sucs / accountmanager</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/sucs/accountmanager/commit/8dadfe40cb435affb95f6da554dbcf6579b501e4">8dadfe40</a></strong>
<div>
<span>by Imran Hussain</span>
<i>at 2019-04-25T18:30:17Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Clean up /home/useradd/ when deleting people.

This is no longer needed as we take a backup of thier ldap entry at that time
</pre>
</li>
<li>
<strong><a href="https://projects.sucs.org/sucs/accountmanager/commit/0a469832920f32e737443e117b4cc9599c7d7361">0a469832</a></strong>
<div>
<span>by Imran Hussain</span>
<i>at 2019-04-25T18:34:00Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove peoples history from printer table when deleting.
</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#51fe0309ae91df4dcf22672ee378f9b97981e746">
sucsam.py
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="51fe0309ae91df4dcf22672ee378f9b97981e746">
<a href="https://projects.sucs.org/sucs/accountmanager/compare/1546496850581a28c5e654f5622b7e45363cf75d...0a469832920f32e737443e117b4cc9599c7d7361#51fe0309ae91df4dcf22672ee378f9b97981e746"><strong>sucsam.py</strong></a>
<hr>
<table class="code white" style="font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder match" id="" style="line-height: 1.6;">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="313" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="313" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="padding-left: 0.5em; padding-right: 0.5em; color: rgba(0,0,0,0.3);" bgcolor="#fafafa">@@ -313,6 +313,9 @@ def deleteUser(peopleList):</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="313" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
313
</td>
<td class="diff-line-num new_line" data-linenumber="313" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
313
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC313" class="line" lang="python">                       <span class="k" style="font-weight: 600;">print</span><span class="p">(</span><span class="s" style="color: #d14;">"Something went wrong deleting the LDAP entry, quitting! NO CHNAGES MADE"</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="314" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
314
</td>
<td class="diff-line-num new_line" data-linenumber="314" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
314
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC314" class="line" lang="python">                       <span class="n" style="color: #333;">sys</span><span class="o" style="font-weight: 600;">.</span><span class="nb" style="color: #0086b3;">exit</span><span class="p">(</span><span class="mi" style="color: #099;">9</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="315" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
315
</td>
<td class="diff-line-num new_line" data-linenumber="315" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
315
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC315" class="line" lang="python"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="316" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="316" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
316
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC316" class="line" lang="python">               <span class="c1" style="color: #998; font-style: italic;"># delete their useradd ldif file</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="316" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="317" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
317
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC317" class="line" lang="python">               <span class="n" style="color: #333;">subprocess</span><span class="o" style="font-weight: 600;">.</span><span class="n" style="color: #333;">call</span><span class="p">([</span><span class="s" style="color: #d14;">'sudo'</span><span class="p">,</span> <span class="s" style="color: #d14;">'rm'</span><span class="p">,</span> <span class="s" style="color: #d14;">"-v"</span><span class="p">,</span> <span class="s" style="color: #d14;">"/home/useradd/useradd."</span> <span class="o" style="font-weight: 600;">+</span> <span class="n" style="color: #333;">username</span> <span class="o" style="font-weight: 600;">+</span> <span class="s" style="color: #d14;">".ldif"</span><span class="p">])</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="316" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="318" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
318
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC318" class="line" lang="python"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="316" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
316
</td>
<td class="diff-line-num new_line" data-linenumber="319" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
319
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC319" class="line" lang="python">               <span class="c1" style="color: #998; font-style: italic;"># move their homedir to the deleted folder</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="317" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
317
</td>
<td class="diff-line-num new_line" data-linenumber="320" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
320
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC320" class="line" lang="python">               <span class="n" style="color: #333;">subprocess</span><span class="o" style="font-weight: 600;">.</span><span class="n" style="color: #333;">call</span><span class="p">([</span><span class="s" style="color: #d14;">'sudo'</span><span class="p">,</span> <span class="s" style="color: #d14;">'mv'</span><span class="p">,</span> <span class="s" style="color: #d14;">"-f"</span><span class="p">,</span> <span class="n" style="color: #333;">userLDAPinfo</span><span class="p">[</span><span class="mi" style="color: #099;">0</span><span class="p">][</span><span class="mi" style="color: #099;">1</span><span class="p">][</span><span class="s" style="color: #d14;">"homeDirectory"</span><span class="p">][</span><span class="mi" style="color: #099;">0</span><span class="p">],</span> <span class="n" style="color: #333;">persondir</span><span class="o" style="font-weight: 600;">+</span><span class="s" style="color: #d14;">"/homedir"</span><span class="p">])</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="318" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
318
</td>
<td class="diff-line-num new_line" data-linenumber="321" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
321
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC321" class="line" lang="python"></span>
</pre>
</td>
</tr>
<tr class="line_holder match" id="" style="line-height: 1.6;">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="342" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="345" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="padding-left: 0.5em; padding-right: 0.5em; color: rgba(0,0,0,0.3);" bgcolor="#fafafa">@@ -342,6 +345,8 @@ def deleteUser(peopleList):</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="342" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
342
</td>
<td class="diff-line-num new_line" data-linenumber="345" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
345
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC345" class="line" lang="python">               <span class="n" style="color: #333;">cur</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">DBconn</span><span class="o" style="font-weight: 600;">.</span><span class="n" style="color: #333;">cursor</span><span class="p">()</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="343" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
343
</td>
<td class="diff-line-num new_line" data-linenumber="346" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
346
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC346" class="line" lang="python">               <span class="c1" style="color: #998; font-style: italic;"># delete from doorcards first</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="344" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
344
</td>
<td class="diff-line-num new_line" data-linenumber="347" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
347
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC347" class="line" lang="python">               <span class="n" style="color: #333;">cur</span><span class="o" style="font-weight: 600;">.</span><span class="n" style="color: #333;">execute</span><span class="p">(</span><span class="s" style="color: #d14;">"DELETE FROM doorcards WHERE uid=</span><span class="si" style="color: #d14;">%(uid)</span><span class="s" style="color: #d14;">s"</span><span class="p">,{</span><span class="s" style="color: #d14;">"uid"</span> <span class="p">:</span> <span class="nb" style="color: #0086b3;">str</span><span class="p">(</span><span class="n" style="color: #333;">userDBinfo</span><span class="p">[</span><span class="mi" style="color: #099;">0</span><span class="p">][</span><span class="mi" style="color: #099;">0</span><span class="p">])})</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="345" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="348" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
348
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC348" class="line" lang="python">               <span class="c1" style="color: #998; font-style: italic;"># delete from printer table</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="345" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="349" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
349
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC349" class="line" lang="python">               <span class="n" style="color: #333;">cur</span><span class="o" style="font-weight: 600;">.</span><span class="n" style="color: #333;">execute</span><span class="p">(</span><span class="s" style="color: #d14;">"DELETE FROM printer WHERE username=</span><span class="si" style="color: #d14;">%(user)</span><span class="s" style="color: #d14;">s"</span><span class="p">,{</span><span class="s" style="color: #d14;">"user"</span> <span class="p">:</span> <span class="n" style="color: #333;">username</span><span class="p">})</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="345" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
345
</td>
<td class="diff-line-num new_line" data-linenumber="350" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
350
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC350" class="line" lang="python">               <span class="c1" style="color: #998; font-style: italic;"># delete from members table</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="346" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
346
</td>
<td class="diff-line-num new_line" data-linenumber="351" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
351
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC351" class="line" lang="python">               <span class="n" style="color: #333;">cur</span><span class="o" style="font-weight: 600;">.</span><span class="n" style="color: #333;">execute</span><span class="p">(</span><span class="s" style="color: #d14;">"DELETE FROM members WHERE username=</span><span class="si" style="color: #d14;">%(user)</span><span class="s" style="color: #d14;">s"</span><span class="p">,{</span><span class="s" style="color: #d14;">"user"</span> <span class="p">:</span> <span class="n" style="color: #333;">username</span><span class="p">})</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="347" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
347
</td>
<td class="diff-line-num new_line" data-linenumber="352" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
352
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC352" class="line" lang="python">               <span class="c1" style="color: #998; font-style: italic;"># add their some details to the oldmembers table</span></span>
</pre>
</td>
</tr>

</table>
<br>
</li>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777777;">

<br>
<a href="https://projects.sucs.org/sucs/accountmanager/compare/1546496850581a28c5e654f5622b7e45363cf75d...0a469832920f32e737443e117b4cc9599c7d7361">View it on GitLab</a>.
<br>
You're receiving this email because of your account on projects.sucs.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.

</p>
</div>
</body>
</html>