Ejemplo n.º 1
0
    def disable_user(self, account):
        dh = DirectoryHelper(
            directoryCN, directoryPassword, directoryDomain)
        result = dh.disable_user(account)

        if result:
            session['flash'] = 'Successfully disabled %s' % account
            session.save()
        else:
            session['flash'] = 'Error disabling %s' % account
            session.save()

        ae = ActivityEngine(Session, session['active_user']['user_id'])
        ae.update('user', None,
                  { 'nsAccountLock': 'true', 'account': account })

        return redirect(url(
                controller='users', action='edit', account=account))