Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-16 Thread Martin Kosek
On 02/16/2015 01:41 PM, Martin Basti wrote:
> On 12/02/15 12:08, Martin Basti wrote:
>> On 11/02/15 17:28, Gabe Alford wrote:
>>> Oops. My mistake. Corrected patch attached.
>>>
>>> On Wed, Feb 11, 2015 at 8:59 AM, Martin Basti >> > wrote:
>>>
>>> Sorry, alwaysask didnt work.
>>> It was asking for rights during permission-mod.
>>>
>>> I replaced alwaysask with flag "ask_create".
>>> Sorry for late catch.
>>>
>>> Updated patch attached.
>>>
>>> PS: your name+email is missing in commit message, is it on
>>> purpose? And time wasn't correct in previous patch.
>>>
>>>
>>>
>>> On 11/02/15 15:06, Gabe Alford wrote:
 Good point. I personally was not aware of all that the API can
 do. Thanks Martin^2! Updated patch attached.

 On Tue, Feb 10, 2015 at 11:42 AM, Martin Basti
 mailto:mba...@redhat.com>> wrote:

 On 29/01/15 17:10, Gabe Alford wrote:
> Hello,
>
> Fix for https://fedorahosted.org/freeipa/ticket/4872
>
> Thanks,
>
> Gabe
>
>
> ___
> Freeipa-devel mailing list
> Freeipa-devel@redhat.com  
> https://www.redhat.com/mailman/listinfo/freeipa-devel
 Thank you for your patch.

 IMO, would be better to use flag, alwaysask for
 ipapermright, instead of creating new callback:

  StrEnum(
  'ipapermright*',
  cli_name='right',
 deprecated_cli_aliases={'permissions'},
  label=_('Granted rights'),
  doc=_('Rights to grant '
'(read, search, compare, write, add,
 delete, all)'),
  values=(u'read', u'search', u'compare',
  u'write', u'add', u'delete', u'all'),
 +alwaysask=True,
  ),

 This change requires to generate new API.txt

 please run ./makeapi  and increment API version in VERSION file.

 Thank you in advance :-)

 Martin^2

 -- Martin Basti


>>>
>>>
>>> -- Martin Basti
>>>
>>>
>> Thank you
>>
>> ACK
>>
>> -- 
>> Martin Basti
>>
>>
>> ___
>> Freeipa-devel mailing list
>> Freeipa-devel@redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
> Somebody, please push this patch.

There was a conflict on master branch.

Rebased and pushed to master, ipa-4-1.

Martin

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


Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-16 Thread Martin Basti

On 12/02/15 12:08, Martin Basti wrote:

On 11/02/15 17:28, Gabe Alford wrote:

Oops. My mistake. Corrected patch attached.

On Wed, Feb 11, 2015 at 8:59 AM, Martin Basti > wrote:


Sorry, alwaysask didnt work.
It was asking for rights during permission-mod.

I replaced alwaysask with flag "ask_create".
Sorry for late catch.

Updated patch attached.

PS: your name+email is missing in commit message, is it on
purpose? And time wasn't correct in previous patch.



On 11/02/15 15:06, Gabe Alford wrote:

Good point. I personally was not aware of all that the API can
do. Thanks Martin^2! Updated patch attached.

On Tue, Feb 10, 2015 at 11:42 AM, Martin Basti
mailto:mba...@redhat.com>> wrote:

On 29/01/15 17:10, Gabe Alford wrote:

Hello,

Fix for https://fedorahosted.org/freeipa/ticket/4872

Thanks,

Gabe


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

Thank you for your patch.

IMO, would be better to use flag, alwaysask for
ipapermright, instead of creating new callback:

 StrEnum(
 'ipapermright*',
 cli_name='right',
deprecated_cli_aliases={'permissions'},
 label=_('Granted rights'),
 doc=_('Rights to grant '
   '(read, search, compare, write, add,
delete, all)'),
 values=(u'read', u'search', u'compare',
 u'write', u'add', u'delete', u'all'),
+alwaysask=True,
 ),

This change requires to generate new API.txt

please run ./makeapi  and increment API version in VERSION file.

Thank you in advance :-)

Martin^2

-- 
Martin Basti






-- 
Martin Basti




Thank you

ACK

--
Martin Basti


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

Somebody, please push this patch.

--
Martin Basti

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

Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-12 Thread Martin Basti

On 11/02/15 17:28, Gabe Alford wrote:

Oops. My mistake. Corrected patch attached.

On Wed, Feb 11, 2015 at 8:59 AM, Martin Basti > wrote:


Sorry, alwaysask didnt work.
It was asking for rights during permission-mod.

I replaced alwaysask with flag "ask_create".
Sorry for late catch.

Updated patch attached.

PS: your name+email is missing in commit message, is it on
purpose? And time wasn't correct in previous patch.



On 11/02/15 15:06, Gabe Alford wrote:

Good point. I personally was not aware of all that the API can
do. Thanks Martin^2! Updated patch attached.

On Tue, Feb 10, 2015 at 11:42 AM, Martin Basti mailto:mba...@redhat.com>> wrote:

On 29/01/15 17:10, Gabe Alford wrote:

Hello,

Fix for https://fedorahosted.org/freeipa/ticket/4872

Thanks,

Gabe


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

Thank you for your patch.

IMO, would be better to use flag, alwaysask for ipapermright,
instead of creating new callback:

 StrEnum(
 'ipapermright*',
 cli_name='right',
deprecated_cli_aliases={'permissions'},
 label=_('Granted rights'),
 doc=_('Rights to grant '
   '(read, search, compare, write, add,
delete, all)'),
 values=(u'read', u'search', u'compare',
 u'write', u'add', u'delete', u'all'),
+alwaysask=True,
 ),

This change requires to generate new API.txt

please run ./makeapi  and increment API version in VERSION file.

Thank you in advance :-)

Martin^2

-- 
Martin Basti






-- 
Martin Basti




Thank you

ACK

--
Martin Basti

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

Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-11 Thread Gabe Alford
Oops. My mistake. Corrected patch attached.

On Wed, Feb 11, 2015 at 8:59 AM, Martin Basti  wrote:

>  Sorry, alwaysask didnt work.
> It was asking for rights during permission-mod.
>
> I replaced alwaysask with flag "ask_create".
> Sorry for late catch.
>
> Updated patch attached.
>
> PS: your name+email is missing in commit message, is it on purpose? And
> time wasn't correct in previous patch.
>
>
>
> On 11/02/15 15:06, Gabe Alford wrote:
>
> Good point. I personally was not aware of all that the API can do. Thanks
> Martin^2! Updated patch attached.
>
> On Tue, Feb 10, 2015 at 11:42 AM, Martin Basti  wrote:
>
>>   On 29/01/15 17:10, Gabe Alford wrote:
>>
>>   Hello,
>>
>>  Fix for https://fedorahosted.org/freeipa/ticket/4872
>>
>>  Thanks,
>>
>> Gabe
>>
>>
>>  ___
>> Freeipa-devel mailing 
>> listFreeipa-devel@redhat.comhttps://www.redhat.com/mailman/listinfo/freeipa-devel
>>
>>  Thank you for your patch.
>>
>> IMO, would be better to use flag, alwaysask for ipapermright, instead of
>> creating new callback:
>>
>>  StrEnum(
>>  'ipapermright*',
>>  cli_name='right',
>>  deprecated_cli_aliases={'permissions'},
>>  label=_('Granted rights'),
>>  doc=_('Rights to grant '
>>'(read, search, compare, write, add, delete, all)'),
>>  values=(u'read', u'search', u'compare',
>>  u'write', u'add', u'delete', u'all'),
>> +alwaysask=True,
>>  ),
>>
>> This change requires to generate new API.txt
>>
>> please run ./makeapi  and increment API version in VERSION file.
>>
>> Thank you in advance :-)
>>
>> Martin^2
>>
>> --
>> Martin Basti
>>
>>
>
>
> --
> Martin Basti
>
>


freeipa-rga-0041-3-permission-add-does-not-prompt-for-ipapermright-in-i.patch
Description: Binary data
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-11 Thread Martin Basti

Sorry, alwaysask didnt work.
It was asking for rights during permission-mod.

I replaced alwaysask with flag "ask_create".
Sorry for late catch.

Updated patch attached.

PS: your name+email is missing in commit message, is it on purpose? And 
time wasn't correct in previous patch.



On 11/02/15 15:06, Gabe Alford wrote:
Good point. I personally was not aware of all that the API can do. 
Thanks Martin^2! Updated patch attached.


On Tue, Feb 10, 2015 at 11:42 AM, Martin Basti > wrote:


On 29/01/15 17:10, Gabe Alford wrote:

Hello,

Fix for https://fedorahosted.org/freeipa/ticket/4872

Thanks,

Gabe


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

Thank you for your patch.

IMO, would be better to use flag, alwaysask for ipapermright,
instead of creating new callback:

 StrEnum(
 'ipapermright*',
 cli_name='right',
 deprecated_cli_aliases={'permissions'},
 label=_('Granted rights'),
 doc=_('Rights to grant '
   '(read, search, compare, write, add, delete,
all)'),
 values=(u'read', u'search', u'compare',
 u'write', u'add', u'delete', u'all'),
+alwaysask=True,
 ),

This change requires to generate new API.txt

please run ./makeapi  and increment API version in VERSION file.

Thank you in advance :-)

Martin^2

-- 
Martin Basti






--
Martin Basti

From 271cef13fce18b882597fcdf530321abf82a6b83 Mon Sep 17 00:00:00 2001
From: Your Name 
Date: Wed, 11 Feb 2015 06:59:41 -0700
Subject: [PATCH] permission-add does not prompt for ipapermright in
 interactive mode

- Add flag "ask_create" to ipalib/plugins/permission.py
- Bump API version

https://fedorahosted.org/freeipa/ticket/4872
---
 API.txt  | 2 +-
 VERSION  | 4 ++--
 ipalib/plugins/permission.py | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/API.txt b/API.txt
index 08615c80476171695dac262575c4e20e72615c36..10e204564e4e00617cf5e447b481592ed5f6d6d4 100644
--- a/API.txt
+++ b/API.txt
@@ -2787,7 +2787,7 @@ option: Str('extratargetfilter', attribute=False, cli_name='filter', multivalue=
 option: Str('filter', attribute=False, cli_name='filter', multivalue=True, required=False)
 option: StrEnum('ipapermbindruletype', attribute=True, autofill=True, cli_name='bindtype', default=u'permission', multivalue=False, required=True, values=(u'permission', u'all', u'anonymous'))
 option: DNOrURL('ipapermlocation', alwaysask=True, attribute=True, autofill=False, cli_name='subtree', multivalue=False, query=False, required=False)
-option: StrEnum('ipapermright', attribute=True, cli_name='right', deprecated_cli_aliases=set(['permissions']), multivalue=True, required=False, values=(u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'))
+option: StrEnum('ipapermright', alwaysask=True, attribute=True, autofill=False, cli_name='right', deprecated_cli_aliases=set(['permissions']), multivalue=True, query=False, required=False, values=(u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'))
 option: DNParam('ipapermtarget', attribute=True, cli_name='target', multivalue=False, required=False)
 option: Str('ipapermtargetfilter', attribute=True, cli_name='rawfilter', multivalue=True, required=False)
 option: Str('memberof', alwaysask=True, attribute=False, autofill=False, cli_name='memberof', multivalue=True, query=False, required=False)
diff --git a/VERSION b/VERSION
index 493b879a5ed1f713f55aae1a0dedf9bb080bc552..9c27c2e4da1405efd7a90f92521c77a285ce7cd1 100644
--- a/VERSION
+++ b/VERSION
@@ -90,5 +90,5 @@ IPA_DATA_VERSION=2010061412
 #  #
 
 IPA_API_VERSION_MAJOR=2
-IPA_API_VERSION_MINOR=112
-# Last change: tbabej - change ipaassignedidview to Str
+IPA_API_VERSION_MINOR=113
+# Last change: Gabe - Add flag "ask_create" to ipapermright
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index 43481b9ebf6a2b35eae301cc2f99315539a2ab1e..2914ea4aa5039a7070c444a0f74d9792cdfb62e2 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -236,6 +236,7 @@ class permission(baseldap.LDAPObject):
   '(read, search, compare, write, add, delete, all)'),
 values=(u'read', u'search', u'compare',
 u'write', u'add', u'delete', u'all'),
+flags={"ask_create"},
 ),
 Str('attrs*',
 label=_('Effective attributes'),
-- 
2.1.0

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

Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-11 Thread Gabe Alford
Good point. I personally was not aware of all that the API can do. Thanks
Martin^2! Updated patch attached.

On Tue, Feb 10, 2015 at 11:42 AM, Martin Basti  wrote:

>  On 29/01/15 17:10, Gabe Alford wrote:
>
>  Hello,
>
>  Fix for https://fedorahosted.org/freeipa/ticket/4872
>
>  Thanks,
>
> Gabe
>
>
> ___
> Freeipa-devel mailing 
> listFreeipa-devel@redhat.comhttps://www.redhat.com/mailman/listinfo/freeipa-devel
>
>  Thank you for your patch.
>
> IMO, would be better to use flag, alwaysask for ipapermright, instead of
> creating new callback:
>
>  StrEnum(
>  'ipapermright*',
>  cli_name='right',
>  deprecated_cli_aliases={'permissions'},
>  label=_('Granted rights'),
>  doc=_('Rights to grant '
>'(read, search, compare, write, add, delete, all)'),
>  values=(u'read', u'search', u'compare',
>  u'write', u'add', u'delete', u'all'),
> +alwaysask=True,
>  ),
>
> This change requires to generate new API.txt
>
> please run ./makeapi  and increment API version in VERSION file.
>
> Thank you in advance :-)
>
> Martin^2
>
> --
> Martin Basti
>
>


freeipa-rga-0041-2-permission-add-does-not-prompt-for-ipapermright-in-i.patch
Description: Binary data
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH 0041] permission-add does not prompt for ipapermright option in interactive mode

2015-02-10 Thread Martin Basti

On 29/01/15 17:10, Gabe Alford wrote:

Hello,

Fix for https://fedorahosted.org/freeipa/ticket/4872

Thanks,

Gabe


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

Thank you for your patch.

IMO, would be better to use flag, alwaysask for ipapermright, instead of 
creating new callback:


 StrEnum(
 'ipapermright*',
 cli_name='right',
 deprecated_cli_aliases={'permissions'},
 label=_('Granted rights'),
 doc=_('Rights to grant '
   '(read, search, compare, write, add, delete, all)'),
 values=(u'read', u'search', u'compare',
 u'write', u'add', u'delete', u'all'),
+alwaysask=True,
 ),

This change requires to generate new API.txt

please run ./makeapi  and increment API version in VERSION file.

Thank you in advance :-)

Martin^2

--
Martin Basti

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