Bug 747730

Summary: command: ipa selfservice-mod "edit address" --permissions="" delete a selfservice permission
Product: Red Hat Enterprise Linux 6 Reporter: Yi Zhang <yzhang>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: dpal, jgalipea, mkosek, spoore
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.2.0-1.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:15:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 756082    

Description Yi Zhang 2011-10-20 21:02:17 UTC
Description of problem:
when give no value for "--permission", ipa server seen like delete this selfservice permission


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. install ipa server
2. create a selfservice permission with this command:
[yi@i386a(101) ~] ipa selfservice-add "edit address" --permission=write,read --attrs=l
--------------------------------
Added selfservice "edit address"
--------------------------------
  Self-service name: edit address
  Permissions: write, read
  Attributes: l

3. confirm the above action with selfservice-find
[yi@i386a(101) ~] ipa selfservice-find
----------------------
3 selfservices matched
----------------------
  Self-service name: Self can write own password
  Permissions: write
  Attributes: userpassword, krbprincipalkey, sambalmpassword, sambantpassword

  Self-service name: User Self service
  Permissions: write
  Attributes: givenname, sn, cn, displayname, title, initials, loginshell, gecos, homephone, mobile, pager, facsimiletelephonenumber, telephonenumber, street,
              roomnumber, l, st, postalcode, manager, secretary, description, carlicense, labeleduri, inetuserhttpurl, seealso, employeetype, businesscategory,
              ou

  Self-service name: edit address
  Permissions: write, read
  Attributes: l
----------------------------
Number of entries returned 3
----------------------------

4. run the problematic command: 
[yi@i386a(101) ~] ipa selfservice-mod "edit address" --permissions=""
ipa: ERROR: 'permissions' is required

5. the error msg look fine, but when run selfservice-find, the permission "edit address" disappeared:
[yi@i386a(101) ~] ipa selfservice-find
----------------------
2 selfservices matched
----------------------
  Self-service name: Self can write own password
  Permissions: write
  Attributes: userpassword, krbprincipalkey, sambalmpassword, sambantpassword

  Self-service name: User Self service
  Permissions: write
  Attributes: givenname, sn, cn, displayname, title, initials, loginshell, gecos, homephone, mobile, pager, facsimiletelephonenumber, telephonenumber, street,
              roomnumber, l, st, postalcode, manager, secretary, description, carlicense, labeleduri, inetuserhttpurl, seealso, employeetype, businesscategory,
              ou
----------------------------
Number of entries returned 2
----------------------------


Additional info: there is no error msg in /var/log/httpd/error_log

Comment 1 Yi Zhang 2011-10-20 21:04:04 UTC
to verify:
1. create selfservice permission:
ipa selfservice-add "edit address" --permission=write,read --attrs=l

2. check with selfservice-find
ipa selfservice-add "edit address" --permission=write,read --attrs=l

3. run problematic statement:
ipa selfservice-mod "edit address" --permissions=""

4. check selfservice permissions with find
ipa selfservice-find


if the "edit address" exist, then test pass

Comment 3 Dmitri Pal 2011-10-20 22:25:48 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2013

Comment 6 Scott Poore 2012-03-16 20:45:28 UTC
Verified.

Version :: ipa-server-2.2.0-4.el6.x86_64

Automated Test Results ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: selfservice_bz_747730 ipa selfservice-mod edit address --permissions="" delete a selfservice permission
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: BZ Test Running: ipa selfservice-mod selfservice_bz_747730 --permissions="" > /tmp/tmp.V5BS5xp3mS/selfservice_bz_747730.26503.out 2>&1
:: [   LOG    ] :: Duration: 12s
:: [   LOG    ] :: Assertions: 0 good, 0 bad
:: [   PASS   ] :: RESULT: selfservice_bz_747730 ipa selfservice-mod edit address --permissions="" delete a selfservice permission

Manual Test Results ::

[root@hp-xw6600-01 ipa-selfservice]# ipa selfservice-add bz747730 --attrs=l
----------------------------
Added selfservice "bz747730"
----------------------------
  Self-service name: bz747730
  Permissions: write
  Attributes: l

[root@hp-xw6600-01 ipa-selfservice]# ipa selfservice-mod bz747730 --permissions=""
ipa: ERROR: 'permissions' is required

[root@hp-xw6600-01 ipa-selfservice]# ipa selfservice-show bz747730
  Self-service name: bz747730
  Permissions: write
  Attributes: l

Comment 8 Martin Kosek 2012-04-18 20:50:40 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 10 errata-xmlrpc 2012-06-20 13:15:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0819.html