Merge lp:~wallyworld/launchpad/branch-infotype-portlet-1040999 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Ian Booth |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15875 |
Proposed branch: | lp:~wallyworld/launchpad/branch-infotype-portlet-1040999 |
Merge into: | lp:launchpad |
Diff against target: |
348 lines (+95/-59) 5 files modified
lib/lp/code/browser/branch.py (+31/-13) lib/lp/code/browser/configure.zcml (+7/-0) lib/lp/code/browser/tests/test_branch.py (+45/-40) lib/lp/code/stories/branches/xx-branch-edit-privacy.txt (+4/-4) lib/lp/code/templates/branch-portlet-privacy.pt (+8/-2) |
To merge this branch: | bzr merge lp:~wallyworld/launchpad/branch-infotype-portlet-1040999 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+121404@code.launchpad.net |
Commit message
Allow branch's information type to be changed from the privacy portlet; always allow branch to be marked as security related.
Description of the change
== Implementation ==
This branch does 2 things:
1. add an edit link to the branch privacy portlet to allow information type to be edited
This branch does not wire up any javascript (that will be done next branch). So the user clicks on the edit link and is taken to a new edit page where they can edit the information type. ie the same non js infrastructure as used elsewhere for lifecycle status etc. The view used to process the information type change does have the ajax processing in place so the next branch will be only javascript.
2. change the algorithm used by getInformationT
Previously, a branch could not be made private/public security unless there were such bugs linked. Now, a branch can always be marked as security. The hooks for checking linked bugs have been left in place though because even though not used right now, very soon user data branches will only be allowed when there are user data linked bugs.
== Tests ==
Add test to TestBranchEditView to check the XHR updating of information type work correctly.
Update tests in TestBranchEditV
Update TestBranchPriva
== Lint ==
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
16 + @enabled_ with_permission ('launchpad. Edit') edit-informatio n-type' , text)
17 + def visibility(self):
18 + """Return the 'Set information type' Link."""
19 + text = 'Change information type'
20 + return Link('+
Should this be information_type instead of visibility?
55 InformationType .PUBLICSECURITY , .PRIVATESECURIT Y,
56 InformationType
57 )
Could you fix these to be in the traditional order (between PUBLIC and USERDATA)?
129 + class=" lp.code. browser. branch. BranchEditInfor mationTypeView" "launchpad. Edit"
130 + permission=
This should probably be launchpad.Moderate. Curtis added it last week to let project owners change the information type too.