Re: [Freeipa-devel] [PATCH] Rename user-lock and user-unlock to user-enable user-disable.

2010-10-06 Thread Rob Crittenden

Pavel Zuna wrote:

On 10/05/2010 06:07 PM, Rob Crittenden wrote:

Pavel Zuna wrote:

Also fixes related unit tests and therefore depends on my patch number
28.

Ticket #165

Pavel


This looks ok but you need to update the examples in the top help block
too:

Lock a user account:
ipa user-lock tuser1

Unlock a user account:
ipa user-unlock tuser1

Fix those and you have an ack.

rob


Fixed version attached.

Pavel


ack, pushed to master

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Rename user-lock and user-unlock to user-enable user-disable.

2010-10-06 Thread Pavel Zuna

On 10/05/2010 06:07 PM, Rob Crittenden wrote:

Pavel Zuna wrote:

Also fixes related unit tests and therefore depends on my patch number
28.

Ticket #165

Pavel


This looks ok but you need to update the examples in the top help block
too:

Lock a user account:
ipa user-lock tuser1

Unlock a user account:
ipa user-unlock tuser1

Fix those and you have an ack.

rob


Fixed version attached.

Pavel
>From 013384a8804859be9f56e9494dee953cc020fbb7 Mon Sep 17 00:00:00 2001
From: Pavel Zuna 
Date: Tue, 5 Oct 2010 15:37:37 -0400
Subject: [PATCH 3/3] Rename user-lock and user-unlock to user-enable user-disable.

Ticket #165
---
 ipalib/plugins/user.py|   24 
 tests/test_xmlrpc/test_user_plugin.py |   12 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 0746553..a6e6b5d 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -37,11 +37,11 @@ EXAMPLES:
  Find all users with "Tim" as the first name:
ipa user-find --first=Tim
 
- Lock a user account:
-   ipa user-lock tuser1
+ Disable a user account:
+   ipa user-disable tuser1
 
- Unlock a user account:
-   ipa user-unlock tuser1
+ Enable a user account:
+   ipa user-enable tuser1
 
  Delete a user:
ipa user-del tuser1
@@ -274,13 +274,13 @@ class user_show(LDAPRetrieve):
 api.register(user_show)
 
 
-class user_lock(LDAPQuery):
+class user_disable(LDAPQuery):
 """
-Lock a user account.
+Disable user account.
 """
 
 has_output = output.standard_value
-msg_summary = _('Locked user "%(value)s"')
+msg_summary = _('Disabled user account "%(value)s"')
 
 def execute(self, *keys, **options):
 ldap = self.obj.backend
@@ -297,16 +297,16 @@ class user_lock(LDAPQuery):
 value=keys[0],
 )
 
-api.register(user_lock)
+api.register(user_disable)
 
 
-class user_unlock(LDAPQuery):
+class user_enable(LDAPQuery):
 """
-Unlock a user account.
+Enable user account.
 """
 
 has_output = output.standard_value
-msg_summary = _('Unlocked user "%(value)s"')
+msg_summary = _('Enabled user account "%(value)s"')
 
 def execute(self, *keys, **options):
 ldap = self.obj.backend
@@ -323,4 +323,4 @@ class user_unlock(LDAPQuery):
 value=keys[0],
 )
 
-api.register(user_unlock)
+api.register(user_enable)
diff --git a/tests/test_xmlrpc/test_user_plugin.py b/tests/test_xmlrpc/test_user_plugin.py
index 1850dc1..7d77131 100644
--- a/tests/test_xmlrpc/test_user_plugin.py
+++ b/tests/test_xmlrpc/test_user_plugin.py
@@ -235,27 +235,27 @@ class test_user(Declarative):
 
 
 dict(
-desc='Lock %r' % user1,
+desc='Disable %r' % user1,
 command=(
-'user_lock', [user1], {}
+'user_disable', [user1], {}
 ),
 expected=dict(
 result=True,
 value=user1,
-summary=u'Locked user "tuser1"',
+summary=u'Disabled user account "tuser1"',
 ),
 ),
 
 
 dict(
-desc='Unlock %r'  % user1,
+desc='Enable %r'  % user1,
 command=(
-'user_unlock', [user1], {}
+'user_enable', [user1], {}
 ),
 expected=dict(
 result=True,
 value=user1,
-summary=u'Unlocked user "tuser1"',
+summary=u'Enabled user account "tuser1"',
 ),
 ),
 
-- 
1.7.1.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH] Rename user-lock and user-unlock to user-enable user-disable.

2010-10-05 Thread Rob Crittenden

Pavel Zuna wrote:

Also fixes related unit tests and therefore depends on my patch number 28.

Ticket #165

Pavel


This looks ok but you need to update the examples in the top help block too:

 Lock a user account:
   ipa user-lock tuser1

 Unlock a user account:
   ipa user-unlock tuser1

Fix those and you have an ack.

rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel